<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <title>CSS Scroll Snap Module Level 1</title>
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <meta content="testing" name="csswg-work-status">
  <meta content="CR" name="w3c-status">
  <meta content="This module contains features to control panning and scrolling behavior with “snap positions”." name="abstract">
  <link href="../default.css" rel="stylesheet" type="text/css">
  <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
  <link href="https://www.w3.org/StyleSheets/TR/2016/W3C-CR" rel="stylesheet" type="text/css">
  <link href="https://www.w3.org/TR/css-scroll-snap-1/" rel="canonical">
<script defer src="https://test.csswg.org/harness/annotate.js#!css-scroll-snap-1_dev/css-scroll-snap-1" type="text/javascript"></script>
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-syntax-highlighting */

.highlight:not(.idl) { background: hsl(24, 20%, 95%); }
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">CSS Scroll Snap Module Level 1</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">W3C Candidate Recommendation, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <div data-fill-with="spec-metadata">
    <dl>
     <dt>This version:
     <dd><a class="u-url" href="https://www.w3.org/TR/1970/CR-css-scroll-snap-1-19700101/">https://www.w3.org/TR/1970/CR-css-scroll-snap-1-19700101/</a>
     <dt>Latest published version:
     <dd><a href="https://www.w3.org/TR/css-scroll-snap-1/">https://www.w3.org/TR/css-scroll-snap-1/</a>
     <dt>Editor's Draft:
     <dd><a href="https://drafts.csswg.org/css-scroll-snap-1/">https://drafts.csswg.org/css-scroll-snap-1/</a>
     <dt>Previous Versions:
     <dd><a href="https://www.w3.org/TR/2019/CR-css-scroll-snap-1-20190131/" rel="prev">https://www.w3.org/TR/2019/CR-css-scroll-snap-1-20190131/</a>
     <dd><a href="https://www.w3.org/TR/2018/CR-css-scroll-snap-1-20180814/" rel="prev">https://www.w3.org/TR/2018/CR-css-scroll-snap-1-20180814/</a>
     <dd><a href="https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20171214/" rel="prev">https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20171214/</a>
     <dd><a href="https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20170824/" rel="prev">https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20170824/</a>
     <dd><a href="https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20170209/" rel="prev">https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20170209/</a>
     <dd><a href="https://www.w3.org/TR/2016/CR-css-scroll-snap-1-20161020/" rel="prev">https://www.w3.org/TR/2016/CR-css-scroll-snap-1-20161020/</a>
     <dd><a href="https://www.w3.org/TR/2016/WD-css-scroll-snap-1-20160623/" rel="prev">https://www.w3.org/TR/2016/WD-css-scroll-snap-1-20160623/</a>
     <dd><a href="https://www.w3.org/TR/2016/WD-css-snappoints-1-20160329/" rel="prev">https://www.w3.org/TR/2016/WD-css-snappoints-1-20160329/</a>
     <dd><a href="https://www.w3.org/TR/2015/WD-css-snappoints-1-20150326/" rel="prev">https://www.w3.org/TR/2015/WD-css-snappoints-1-20150326/</a>
     <dt>Test Suite:
     <dd><a href="http://test.csswg.org/suites/css-scroll-snap-1_dev/nightly-unstable/">http://test.csswg.org/suites/css-scroll-snap-1_dev/nightly-unstable/</a>
     <dt class="editor">Editors:
     <dd class="editor p-author h-card vcard" data-editor-id="62267"><span class="p-name fn">Matt Rakow</span> (<span class="p-org org">Microsoft</span>)
     <dd class="editor p-author h-card vcard" data-editor-id="45616"><span class="p-name fn">Jacob Rossi</span> (<span class="p-org org">Microsoft</span>)
     <dd class="editor p-author h-card vcard" data-editor-id="42199"><a class="p-name fn u-url url" href="http://xanthir.com/contact/">Tab Atkins-Bittner</a> (<span class="p-org org">Google</span>)
     <dd class="editor p-author h-card vcard" data-editor-id="35400"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">Elika J. Etemad / fantasai</a> (<span class="p-org org">Invited Expert</span>)
     <dt>Suggest an Edit for this Spec:
     <dd><a href="https://github.com/w3c/csswg-drafts/blob/master/css-scroll-snap-1/Overview.bs">GitHub Editor</a>
     <dt>Issue Tracking:
     <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-scroll-snap-1">GitHub Issues</a>
    </dl>
   </div>
   <div data-fill-with="warning"></div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>This module contains features to control panning and scrolling behavior with “snap positions”.</p>
    <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc. 
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> <em>This section describes the status of this document at the time of its publication.
		Other documents may supersede this document.
		A list of current W3C publications and the latest revision of this technical report
		can be found in the <a href="https://www.w3.org/TR/">W3C technical reports index at https://www.w3.org/TR/.</a></em> </p>
   <p> This document was produced by the <a href="https://www.w3.org/Style/CSS/">CSS Working Group</a> as a Candidate Recommendation. This document is intended to become a W3C Recommendation.
	This document will remain a Candidate Recommendation at least until <time class="status-deadline" datetime="2019-05-01">1 May 2019</time> in order
	to ensure the opportunity for wide review. </p>
   <p> <a href="https://github.com/w3c/csswg-drafts/issues">GitHub Issues</a> are preferred for discussion of this specification.
	When filing an issue, please put the text “css-scroll-snap” in the title,
	preferably like this:
	“[css-scroll-snap] <i data-lt>…summary of comment…</i>”.
	All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>,
	and there is also a <a href="https://lists.w3.org/Archives/Public/www-style/">historical archive</a>. </p>
   <p> Publication as a Candidate Recommendation does not imply endorsement by the W3C
	Membership. This is a draft document and may be updated, replaced or
	obsoleted by other documents at any time. It is inappropriate to cite this
	document as other than work in progress. </p>
   <p> This document was produced by a group operating under
	the <a href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent Policy</a>.
	W3C maintains a <a href="https://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
	that page also includes instructions for disclosing a patent.
	An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p> For changes since the last draft,
	see the <a href="#changes">Changes</a> section. </p>
   <p></p>
   <p>A test suite and an implementation report will be produced during the

CR period.</p>
  </div>
  <div data-fill-with="at-risk">
   <p>The following features are at-risk, and may be dropped during the CR period: </p>
   <ul>
    <li><a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-stop" id="ref-for-propdef-scroll-snap-stop">scroll-snap-stop</a>
   </ul>
   <p>“At-risk” is a W3C Process term-of-art, and does not necessarily imply that the feature is in danger of being dropped or delayed. It means that the WG believes the feature may have difficulty being interoperably implemented in a timely manner, and marking it as such allows the WG to drop the feature if necessary when transitioning to the Proposed Rec stage, without having to publish a new Candidate Rec without the feature first.</p>
  </div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li>
     <a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a>
     <ol class="toc">
      <li><a href="#placement"><span class="secno">1.1</span> <span class="content">Module interactions</span></a>
      <li><a href="#values"><span class="secno">1.2</span> <span class="content">Values</span></a>
     </ol>
    <li><a href="#examples"><span class="secno">2</span> <span class="content">Motivating Examples</span></a>
    <li><a href="#overview"><span class="secno">3</span> <span class="content">Scroll Snap Model</span></a>
    <li>
     <a href="#properties-on-the-scroll-container"><span class="secno">4</span> <span class="content">Capturing Scroll Snap Areas:  Properties on the scroll container</span></a>
     <ol class="toc">
      <li>
       <a href="#scroll-snap-type"><span class="secno">4.1</span> <span class="content">Scroll Snapping Rules: the <span class="property">scroll-snap-type</span> property</span></a>
       <ol class="toc">
        <li><a href="#snap-axis"><span class="secno">4.1.1</span> <span class="content"> Scroll Snap Axis: the <span class="css">x</span>, <span class="css">y</span>, <span class="css">block</span>, <span class="css">inline</span>, and <span class="css">both</span> values</span></a>
        <li><a href="#snap-strictness"><span class="secno">4.1.2</span> <span class="content"> Scroll Snap Strictness: the <span class="css">none</span>, <span class="css">proximity</span>, and <span class="css">mandatory</span> values</span></a>
        <li><a href="#re-snap"><span class="secno">4.1.3</span> <span class="content"> Re-snapping After Layout Changes</span></a>
       </ol>
      <li><a href="#scroll-padding"><span class="secno">4.2</span> <span class="content">Scroll Snapport: the <span class="property">scroll-padding</span> property</span></a>
     </ol>
    <li>
     <a href="#properties-on-the-elements"><span class="secno">5</span> <span class="content">Aligning Scroll Snap Areas:  Properties on the elements</span></a>
     <ol class="toc">
      <li><a href="#scroll-margin"><span class="secno">5.1</span> <span class="content">Scroll Snapping Area: the <span class="property">scroll-margin</span> property</span></a>
      <li>
       <a href="#scroll-snap-align"><span class="secno">5.2</span> <span class="content">Scroll Snapping Alignment: the <span class="property">scroll-snap-align</span> property</span></a>
       <ol class="toc">
        <li><a href="#snap-scope"><span class="secno">5.2.1</span> <span class="content"> Scoping Valid Snap Positions to Visible Boxes</span></a>
        <li><a href="#snap-overflow"><span class="secno">5.2.2</span> <span class="content"> Snapping Boxes that Overflow the Scrollport</span></a>
        <li><a href="#unreachable"><span class="secno">5.2.3</span> <span class="content"> Unreachable Snap Positions</span></a>
       </ol>
      <li><a href="#scroll-snap-stop"><span class="secno">5.3</span> <span class="content">Scroll Snap Limits: the <span class="property">scroll-snap-stop</span> property</span></a>
     </ol>
    <li>
     <a href="#snap-concepts"><span class="secno">6</span> <span class="content">Snapping Mechanics</span></a>
     <ol class="toc">
      <li><a href="#scroll-types"><span class="secno">6.1</span> <span class="content">Types of Scrolling Methods</span></a>
      <li><a href="#choosing"><span class="secno">6.2</span> <span class="content">Choosing Snap Positions</span></a>
     </ol>
    <li>
     <a href="#longhands"><span class="secno"></span> <span class="content">Appendix A: Longhands</span></a>
     <ol class="toc">
      <li><a href="#padding-longhands-physical"><span class="secno"></span> <span class="content">Physical Longhands for <span class="property">scroll-padding</span></span></a>
      <li><a href="#padding-longhands-logical"><span class="secno"></span> <span class="content">Flow-relative Longhands for <span class="property">scroll-padding</span></span></a>
      <li><a href="#margin-longhands-physical"><span class="secno"></span> <span class="content">Physical Longhands for <span class="property">scroll-margin</span></span></a>
      <li><a href="#margin-longhands-logical"><span class="secno"></span> <span class="content">Flow-relative Longhands for <span class="property">scroll-margin</span></span></a>
     </ol>
    <li><a href="#priv-sec"><span class="secno">7</span> <span class="content">Privacy and Security Considerations</span></a>
    <li><a href="#acknowledgements"><span class="secno">8</span> <span class="content">Acknowledgements</span></a>
    <li>
     <a href="#changes"><span class="secno">9</span> <span class="content">Changes</span></a>
     <ol class="toc">
      <li><a href="#changes-20190131"><span class="secno">9.1</span> <span class="content">Changes Since 31 January 2019 CR</span></a>
      <li><a href="#changes-20171214"><span class="secno">9.2</span> <span class="content">Changes Since 14 December 2017 CR</span></a>
      <li><a href="#changes-20170824"><span class="secno">9.3</span> <span class="content">Changes Since 24 August 2017 CR</span></a>
      <li><a href="#changes-20161020"><span class="secno">9.4</span> <span class="content">Changes Since 20 October 2016 CR</span></a>
     </ol>
    <li>
     <a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
     <ol class="toc">
      <li><a href="#document-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
      <li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
      <li>
       <a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
       <ol class="toc">
        <li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
        <li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
        <li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
       </ol>
      <li><a href="#cr-exit-criteria"><span class="secno"></span> <span class="content"> CR exit criteria</span></a>
     </ol>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
     </ol>
    <li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2>
   <p><em>This section is not normative.</em></p>
   <p>Popular UX paradigms for scrollable content frequently employ paging through content,
    or sectioning into logical divisions.
    This is especially true for touch interactions
    where it is quicker and easier for users to quickly pan through a flatly-arranged breadth of content
    rather than delving into a heirarchical structure through tap navigation.
    For example, it is easier for a user to view many photos in a photo album
    by panning through a photo slideshow view
    rather than tapping on individual photos in an album.</p>
   <p>However, given the imprecise nature of scrolling inputs
    like touch panning and mousewheel scrolling,
    it is difficult for web developers to guarantee a well-controlled scrolling experience,
    in particular creating the effect of paging through content.
    For instance, it is easy for a user to land at an awkward scroll position
    which leaves an item partially on-screen when panning.</p>
   <p>To this end, this module introduces <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position">scroll snap positions</a> which enforce the scroll positions that a <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container">scroll container’s</a> scrollport may end at
    after a scrolling operation has completed.</p>
   <p>Also, to offer better control over paging and scroll positioning
    even when snapping is off,
    this module defines the <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding">scroll-padding</a> property
    for use on all <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①">scroll containers</a>,
    to adjust the <span id="ref-for-scroll-container②">scroll container</span>’s <a data-link-type="dfn" href="#optimal-viewing-region" id="ref-for-optimal-viewing-region">optimal viewing region</a> for the purpose of paging and scroll-into-view operations.
    Similarly the <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin">scroll-margin</a> property can be used on any box
    to adjust its visual area
    for the purpose of scroll-into-view operations.</p>
   <h3 class="heading settled" data-level="1.1" id="placement"><span class="secno">1.1. </span><span class="content">Module interactions</span><a class="self-link" href="#placement"></a></h3>
   <p>This module extends the scrolling user interface features defined in <a data-link-type="biblio" href="#biblio-css2">[CSS2]</a> section 11.1.</p>
   <p>None of the properties in this module apply to the <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-first-line" id="ref-for-selectordef-first-line">::first-line</a> and <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter" id="ref-for-selectordef-first-letter">::first-letter</a> pseudo-elements.</p>
   <h3 class="heading settled" data-level="1.2" id="values"><span class="secno">1.2. </span><span class="content">Values</span><a class="self-link" href="#values"></a></h3>
   <p>This specification follows the <a href="https://www.w3.org/TR/CSS21/about.html#property-defs">CSS property definition conventions</a> from <a data-link-type="biblio" href="#biblio-css2">[CSS2]</a>.
    Value types not defined in this specification are defined in CSS Values &amp; Units <a data-link-type="biblio" href="#biblio-css-values-3">[CSS-VALUES-3]</a>.
    Other CSS modules may expand the definitions of these value types.</p>
   <p>In addition to the property-specific values listed in their definitions,
    all properties defined in this specification
    also accept the <a data-link-type="dfn" href="https://www.w3.org/TR/css-values-4/#css-wide-keywords" id="ref-for-css-wide-keywords">CSS-wide keywords</a> keywords as their property value.
    For readability they have not been repeated explicitly.</p>
   <h2 class="heading settled" data-level="2" id="examples"><span class="secno">2. </span><span class="content">Motivating Examples</span><a class="self-link" href="#examples"></a></h2>
   <div class="example" id="example-b9bef3ed">
    <a class="self-link" href="#example-b9bef3ed"></a> In this example, a series of images arranged in a <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③">scroll container</a> are used to build a photo gallery.  In this example the <span id="ref-for-scroll-container④">scroll container</span> is larger than the photos contained within (such that multiple images may be seen simultaneously), and the image
        sizes vary.  Using mandatory element-based snap
        positions, scrolling will always complete with an image centered in the <span id="ref-for-scroll-container⑤">scroll container’s</span> scrollport. 
<pre class="lang-css highlight"><c- f>img </c-><c- p>{</c->
    <c- c>/* Specifies that the center of each photo</c->
<c- c>       should align with the center of the scroll</c->
<c- c>       container in the X axis when snapping */</c->
    <c- k>scroll-snap-align</c-><c- p>:</c-> none center<c- p>;</c->
<c- p>}</c->
<c- f>.photoGallery </c-><c- p>{</c->
    <c- k>width</c-><c- p>:</c-> <c- m>500</c-><c- l>px</c-><c- p>;</c->
    <c- k>overflow-x</c-><c- p>:</c-> auto<c- p>;</c->
    <c- k>overflow-y</c-><c- p>:</c-> hidden<c- p>;</c->
    <c- k>white-space</c-><c- p>:</c-> nowrap<c- p>;</c->
    <c- c>/* Requires that the scroll position always be</c->
<c- c>       at a snap position when the scrolling</c->
<c- c>       operation completes. */</c->
    <c- k>scroll-snap-type</c-><c- p>:</c-> x mandatory<c- p>;</c->
<c- p>}</c->
</pre>
<pre class="lang-html highlight"><c- p>&lt;</c-><c- f>div</c-> <c- e>class</c-><c- o>=</c-><c- s>"photoGallery"</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>img</c-> <c- e>src</c-><c- o>=</c-><c- s>"img1.jpg"</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>img</c-> <c- e>src</c-><c- o>=</c-><c- s>"img2.jpg"</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>img</c-> <c- e>src</c-><c- o>=</c-><c- s>"img3.jpg"</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>img</c-> <c- e>src</c-><c- o>=</c-><c- s>"img4.jpg"</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>img</c-> <c- e>src</c-><c- o>=</c-><c- s>"img5.jpg"</c-><c- p>></c->
<c- p>&lt;/</c-><c- f>div</c-><c- p>></c->
</pre>
    <figure>
      <img alt src="images/element_snap_positions.png"> 
     <figcaption> The layout of the scroll container’s contents in the example.
                The snapport is represented by the red rectangle, and the snap area is represented by the yellow rectangle.  Since the scroll-snap-align is “center” in the inline (horizontal) axis, a snap position is established at each scroll position which aligns the X-center of the snapport (represented by a red dotted line) with the X-center of a snap area (represented by a yellow dotted line). </figcaption>
    </figure>
   </div>
   <div class="example" id="example-a6210411">
    <a class="self-link" href="#example-a6210411"></a> This example builds a paginated document that aligns each page near to (but not exactly on) the edge of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container⑥">scroll container</a>.
        This allows the previous page to “peek” in from above in order to make the user aware that they are not yet at the top of the document.
        Using proximity snap positions instead of mandatory snap positions allows the user to stop halfway through a page (rather than forcing them
        to snap one page at a time).  However, if a scrolling operation would finish near a snap position, then the scroll will be adjusted to
        align the page as specified. 
<pre class="lang-css highlight"><c- f>.page </c-><c- p>{</c->
    <c- c>/* Defines the top of each page as the</c->
<c- c>       edge that should be used for snapping */</c->
    <c- k>scroll-snap-align</c-><c- p>:</c-> start none<c- p>;</c->
<c- p>}</c->
<c- f>.docScroller </c-><c- p>{</c->
    <c- k>width</c-><c- p>:</c-> <c- m>500</c-><c- l>px</c-><c- p>;</c->
    <c- k>overflow-x</c-><c- p>:</c-> hidden<c- p>;</c->
    <c- k>overflow-y</c-><c- p>:</c-> auto<c- p>;</c->
    <c- c>/* Specifies that each element’s snap area should</c->
<c- c>       align with a 100px offset from the top edge. */</c->
    <c- k>scroll-padding</c-><c- p>:</c-> <c- m>100</c-><c- l>px</c-> <c- m>0</c-> <c- m>0</c-><c- p>;</c->
    <c- c>/* Encourages scrolling to end at a snap position when the</c->
<c- c>        operation completes, if it is near a snap position */</c->
    <c- k>scroll-snap-type</c-><c- p>:</c-> y proximity<c- p>;</c->
<c- p>}</c->
</pre>
<pre class="lang-html highlight"><c- p>&lt;</c-><c- f>div</c-> <c- e>class</c-><c- o>=</c-><c- s>"docScroller"</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>div</c-> <c- e>class</c-><c- o>=</c-><c- s>"page"</c-><c- p>></c->Page 1<c- p>&lt;/</c-><c- f>div</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>div</c-> <c- e>class</c-><c- o>=</c-><c- s>"page"</c-><c- p>></c->Page 2<c- p>&lt;/</c-><c- f>div</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>div</c-> <c- e>class</c-><c- o>=</c-><c- s>"page"</c-><c- p>></c->Page 3<c- p>&lt;/</c-><c- f>div</c-><c- p>></c->
    <c- p>&lt;</c-><c- f>div</c-> <c- e>class</c-><c- o>=</c-><c- s>"page"</c-><c- p>></c->Page 4<c- p>&lt;/</c-><c- f>div</c-><c- p>></c->
<c- p>&lt;/</c-><c- f>div</c-><c- p>></c->
</pre>
    <figure>
      <img alt src="images/element_snap_positions_offset.png"> 
     <figcaption> The layout of the scroll container’s contents in the example.
                The snapport is represented by the red rectangle
                (inset from the top by 100px due to the scroll-padding),
                and the snap area is represented by the yellow rectangle.
                Since the scroll-snap-align is “start” in the Y axis,
                a snap position is established at each scroll position
                which aligns the Y-start of the snapport
                (represented by a red dotted line)
                with the Y-start of a snap area
                (represented by a yellow dotted line). </figcaption>
    </figure>
   </div>
   <h2 class="heading settled" data-level="3" id="overview"><span class="secno">3. </span><span class="content">Scroll Snap Model</span><a class="self-link" href="#overview"></a></h2>
   <p>This module defines controls fo <dfn class="dfn-paneled" data-dfn-type="dfn" data-local-lt="snap position" data-lt="scroll snap position" data-noexport id="scroll-snap-position">scroll snap positions</dfn>,
    which are scroll positions that produce particular alignments
    of content within a scroll container.
    Using the <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type">scroll-snap-type</a> property on the relevant <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container⑦">scroll container</a>,
    the author can request a particular bias
    for the scrollport to land on a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①">snap position</a> after scrolling operations
    (including programmatic scrolls such as the <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/cssom-view/#dom-window-scrollto" id="ref-for-dom-window-scrollto">scrollTo()</a></code> method).</p>
   <p><a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position②">Snap positions</a> are specified
    as a particular alignment (<a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-align" id="ref-for-propdef-scroll-snap-align">scroll-snap-align</a>)
    of an element’s <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area">scroll snap area</a> (its border bounding box, as modified by <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin①">scroll-margin</a>)
    within the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container⑧">scroll container</a>’s <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport">snapport</a> (its scrollport, as reduced by <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①">scroll-padding</a>).
    This is conceptually equivalent to specifying the alignment of
    an <a data-link-type="dfn" href="https://www.w3.org/TR/css3-align/#alignment-subject" id="ref-for-alignment-subject">alignment subject</a> within an <a data-link-type="dfn" href="https://www.w3.org/TR/css3-align/#alignment-container" id="ref-for-alignment-container">alignment container</a>.
    A scroll position that satisfies the specified alignment
    is a <span id="ref-for-scroll-snap-position③">snap position</span>.</p>
   <p>The act of adjusting the scroll position
    of a scroll container’s scrollport
    such that it is aligned to a snap position
    is called <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="snap | snapping | snapped" data-noexport id="snap">snapping</dfn>,
    and a <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container⑨">scroll container</a> is said to be <a data-link-type="dfn" href="#snap" id="ref-for-snap">snapped</a> to a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position④">snap position</a> if its scrollport’s scroll position
    is that <span id="ref-for-scroll-snap-position⑤">snap position</span> and there is no active scrolling operation.
    The CSS Scroll Snap Module
    intentionally does not specify nor mandate
    any precise animations or physics used to enforce <span id="ref-for-scroll-snap-position⑥">snap positions</span>;
    this is left up to the user agent.</p>
   <p><a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position⑦">Snap positions</a> only affect the nearest ancestor <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①⓪">scroll container</a> on the element’s <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#containing-block-chain" id="ref-for-containing-block-chain">containing block chain</a>.</p>
   <h2 class="heading settled" data-level="4" id="properties-on-the-scroll-container"><span class="secno">4. </span><span class="content">Capturing Scroll Snap Areas:  Properties on the scroll container</span><a class="self-link" href="#properties-on-the-scroll-container"></a></h2>
   <h3 class="heading settled" data-level="4.1" id="scroll-snap-type"><span class="secno">4.1. </span><span class="content">Scroll Snapping Rules: the <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type①">scroll-snap-type</a> property</span><a class="self-link" href="#scroll-snap-type"></a></h3>
   <table class="def propdef" data-link-for-hint="scroll-snap-type">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-snap-type">scroll-snap-type</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">none <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one">|</a> [ x <span id="ref-for-comb-one①">|</span> y <span id="ref-for-comb-one②">|</span> block <span id="ref-for-comb-one③">|</span> inline <span id="ref-for-comb-one④">|</span> both ] [ mandatory <span id="ref-for-comb-one⑤">|</span> proximity ]<a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#mult-opt" id="ref-for-mult-opt">?</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>none 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>specified keyword(s) 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type②">scroll-snap-type</a> property specifies
    whether a <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①①">scroll container</a> is a <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container">scroll snap container</a>,
    how <a href="#snap-strictness">strictly</a> it <a data-link-type="dfn" href="#snap" id="ref-for-snap①">snaps</a>,
    and <a href="#snap-axis">which axes</a> are considered.
    If no strictness value is specified, <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-proximity" id="ref-for-valdef-scroll-snap-type-proximity">proximity</a> is assumed.</p>
   <div class="example" id="example-35961710">
    <a class="self-link" href="#example-35961710"></a> In this example, snapping to headings is enabled in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#block-axis" id="ref-for-block-axis">block axis</a> (the y axis for horizontal writing, x axis for vertical writing): 
<pre>html {
  scroll-snap-type: block;   /* applied to main document scroller */
}
h1, h2, h3, h4, h5, h6 {
  scroll-snap-align: start;  /* snap to the start (top) of the viewport */
}
</pre>
   </div>
   <p>UAs must apply the <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type③">scroll-snap-type</a> value set on the root element
    to the document viewport.
    Note that, unlike <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-overflow-3/#propdef-overflow" id="ref-for-propdef-overflow">overflow</a>, <span class="property" id="ref-for-propdef-scroll-snap-type④">scroll-snap-type</span> values are <em>not</em> propagated from HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element" id="ref-for-the-body-element">body</a></code>.</p>
   <h4 class="heading settled" data-level="4.1.1" id="snap-axis"><span class="secno">4.1.1. </span><span class="content"> Scroll Snap Axis: the <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-x" id="ref-for-valdef-scroll-snap-type-x">x</a>, <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-y" id="ref-for-valdef-scroll-snap-type-y">y</a>, <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-block" id="ref-for-valdef-scroll-snap-type-block">block</a>, <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-inline" id="ref-for-valdef-scroll-snap-type-inline">inline</a>, and <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-both" id="ref-for-valdef-scroll-snap-type-both">both</a> values</span><a class="self-link" href="#snap-axis"></a></h4>
   <p>The <dfn data-dfn-type="dfn" data-lt="axis value" data-noexport id="axis-value">axis values<a class="self-link" href="#axis-value"></a></dfn> specify what axis(es) are affected by <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position⑧">snap positions</a>,
    and whether <span id="ref-for-scroll-snap-position⑨">snap positions</span> are evaluated independently per axis,
    or together as a 2D point.
    Values are defined as follows:</p>
   <dl>
    <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-snap-type" data-dfn-type="value" data-export id="valdef-scroll-snap-type-x">x</dfn> 
    <dd> The <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①②">scroll container</a> <a data-link-type="dfn" href="#snap" id="ref-for-snap②">snaps</a> to <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①⓪">snap positions</a> in its horizontal axis only. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-snap-type" data-dfn-type="value" data-export id="valdef-scroll-snap-type-y">y</dfn> 
    <dd> The <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①③">scroll container</a> <a data-link-type="dfn" href="#snap" id="ref-for-snap③">snaps</a> to <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①①">snap positions</a> in its vertical axis only. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-snap-type" data-dfn-type="value" data-export id="valdef-scroll-snap-type-block">block</dfn> 
    <dd> The <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①④">scroll container</a> <a data-link-type="dfn" href="#snap" id="ref-for-snap④">snaps</a> to <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①②">snap positions</a> in its block axis only. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-snap-type" data-dfn-type="value" data-export id="valdef-scroll-snap-type-inline">inline</dfn> 
    <dd> The <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①⑤">scroll container</a> <a data-link-type="dfn" href="#snap" id="ref-for-snap⑤">snaps</a> to <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①③">snap positions</a> in its inline axis only. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-snap-type" data-dfn-type="value" data-export id="valdef-scroll-snap-type-both">both</dfn> 
    <dd> The <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①⑥">scroll container</a> <a data-link-type="dfn" href="#snap" id="ref-for-snap⑥">snaps</a> to <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①④">snap positions</a> in both of its axes independently
            (potentially snapping to different elements in each axis). 
   </dl>
   <h4 class="heading settled" data-level="4.1.2" id="snap-strictness"><span class="secno">4.1.2. </span><span class="content"> Scroll Snap Strictness: the <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-none" id="ref-for-valdef-scroll-snap-type-none">none</a>, <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-proximity" id="ref-for-valdef-scroll-snap-type-proximity①">proximity</a>, and <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-mandatory" id="ref-for-valdef-scroll-snap-type-mandatory">mandatory</a> values</span><a class="self-link" href="#snap-strictness"></a></h4>
   <p>The <dfn data-dfn-type="dfn" data-lt="strictness value" data-noexport id="strictness-value">strictness values<a class="self-link" href="#strictness-value"></a></dfn> (<a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-none" id="ref-for-valdef-scroll-snap-type-none①">none</a>, <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-proximity" id="ref-for-valdef-scroll-snap-type-proximity②">proximity</a>, <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-mandatory" id="ref-for-valdef-scroll-snap-type-mandatory①">mandatory</a>)
    specify how strictly <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①⑤">snap positions</a> are enforced on the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①⑦">scroll container</a> (by forcing an adjustment to the scroll position).
    Values are defined as follows:</p>
   <dl>
    <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-snap-type" data-dfn-type="value" data-export id="valdef-scroll-snap-type-none">none</dfn> 
    <dd> If specified on a <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container①⑧">scroll container</a>,
            the <span id="ref-for-scroll-container①⑨">scroll container</span> must not <a data-link-type="dfn" href="#snap" id="ref-for-snap⑦">snap</a>. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-snap-type" data-dfn-type="value" data-export id="valdef-scroll-snap-type-mandatory">mandatory</dfn> 
    <dd> If specified on a <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container②⓪">scroll container</a>,
            the <span id="ref-for-scroll-container②①">scroll container</span> is required to be <a data-link-type="dfn" href="#snap" id="ref-for-snap⑧">snapped</a> to a snap position
            when there are no active scrolling operations.
            If a valid <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①⑥">snap position</a> exists
            then the scroll container must <span id="ref-for-snap⑨">snap</span> at the termination of a scroll
            (if none exist then no <span id="ref-for-snap①⓪">snapping</span> occurs). 
    <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-snap-type" data-dfn-type="value" data-export id="valdef-scroll-snap-type-proximity">proximity</dfn> 
    <dd> If specified on a <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container②②">scroll container</a>,
            the <span id="ref-for-scroll-container②③">scroll container</span> may <a data-link-type="dfn" href="#snap" id="ref-for-snap①①">snap</a> to a snap position
            at the termination of a scroll,
            at the discretion of the UA given the parameters of the scroll. 
   </dl>
   <p><strong class="advisement"> Authors should use mandatory snap positions with consideration of
    varyingly-sized screens and (if applicable) varying-sized content.
    In particular, although access to snapped elements larger than the scrollport
    is handled by the UA,
    if authors assign mandatory snapping to non-adjacent siblings,
    content in between can become inaccessible
    in cases where it is longer than the screen.</strong></p>
   <p>A box <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="captures-snap-positions">captures snap positions</dfn> if it is a <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container②④">scroll container</a> <em>or</em> has a value other than <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-none" id="ref-for-valdef-scroll-snap-type-none②">none</a> for <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type⑤">scroll-snap-type</a>.
    If a box’s nearest <a data-link-type="dfn" href="#captures-snap-positions" id="ref-for-captures-snap-positions">snap-position capturing</a> ancestor
    on its <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#containing-block-chain" id="ref-for-containing-block-chain①">containing block chain</a> is a <span id="ref-for-scroll-container②⑤">scroll container</span> with a non-<span class="css" id="ref-for-valdef-scroll-snap-type-none③">none</span> value for <span class="property" id="ref-for-propdef-scroll-snap-type⑥">scroll-snap-type</span>,
    that is the box’s <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="snap container" id="scroll-snap-container">scroll snap container</dfn>.
    Otherwise, the box has no <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container①">scroll snap container</a>,
    and its <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①⑦">snap positions</a> do not trigger <a data-link-type="dfn" href="#snap" id="ref-for-snap①②">snapping</a>.</p>
   <h4 class="heading settled" data-level="4.1.3" id="re-snap"><span class="secno">4.1.3. </span><span class="content"> Re-snapping After Layout Changes</span><a class="self-link" href="#re-snap"></a></h4>
   <p>If the content or layout of the document changes
    (e.g. content is added, moved, deleted, resized)
    such that the content of a <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport①">snapport</a> changes,
    the UA must re-evaluate the resulting <a data-link-type="dfn">scroll position</a>,
    and re-snap if required.
    If the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container②⑥">scroll container</a> was <a data-link-type="dfn" href="#snap" id="ref-for-snap①③">snapped</a> before the content change
    and that same <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①⑧">snap position</a> still exists
    (e.g. its associated element was not deleted),
    the scroll container must be re-snapped to that same snap position
    after the content change.</p>
   <div class="example" id="example-542ab8d7">
    <a class="self-link" href="#example-542ab8d7"></a> In the following example,
		the log console,
		when initially loaded and as each message is added to the bottom,
		remains snapped to the bottom of the content
		unless the user has scrolled away from that edge: 
<pre class="lang-css highlight"><c- f>.log </c-><c- p>{</c->
  <c- k>scroll-snap-type</c-><c- p>:</c-> proximity<c- p>;</c->
  <c- k>align-content</c-><c- p>:</c-> end<c- p>;</c->
<c- p>}</c->
<c- f>.log::after </c-><c- p>{</c->
  <c- k>display</c-><c- p>:</c-> block<c- p>;</c->
  <c- k>content</c-><c- p>:</c-> <c- s>""</c-><c- p>;</c->
  <c- k>scroll-snap-align</c-><c- p>:</c-> end<c- p>;</c->
<c- p>}</c->
</pre>
    <p>The rules create a single <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area①">scroll snap area</a> represented by the <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-after" id="ref-for-selectordef-after">::after</a> pseudo-element,
		positioned at the very bottom of a <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container②">scroll snap container</a>.
		If the user scrolls “near” the bottom,
		the container will snap to it.
		If more content is dynamically added to the container,
		it’ll remain snapped to it
		(because scroll containers are required
		to re-snap to the same scroll snap area
		if it still exists after any changes).
		However, if the user has scrolled to somewhere else in the logs,
		it won’t do anything at all.</p>
   </div>
   <h3 class="heading settled" data-level="4.2" id="scroll-padding"><span class="secno">4.2. </span><span class="content">Scroll Snapport: the <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding②">scroll-padding</a> property</span><a class="self-link" href="#scroll-padding"></a></h3>
   <table class="def propdef" data-link-for-hint="scroll-padding">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-padding">scroll-padding</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">[ auto <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one⑥">|</a> <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage">&lt;length-percentage></a> ]<a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#mult-num-range" id="ref-for-mult-num-range">{1,4}</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>auto 
     <tr>
      <th>Applies to:
      <td><a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container②⑦">scroll containers</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>relative to the corresponding dimension of the scroll container’s scrollport 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>per side, either the keyword <a class="css" data-link-type="maybe" href="#valdef-scroll-padding-auto" id="ref-for-valdef-scroll-padding-auto">auto</a> or a computed <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage①">&lt;length-percentage></a> value 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value type 
     <tr>
      <th>Canonical order:
      <td>per grammar 
   </table>
   <p>This property specifies
    (for all <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container②⑧">scroll containers</a>, not just <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container③">scroll snap containers</a>)
    offsets that define the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="optimal-viewing-region">optimal viewing region</dfn> of a scrollport:
    the region used as the target region for placing things in view of the user.
    This allows the author to exclude regions of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollport" id="ref-for-scrollport">scrollport</a> that are obscured by other content
    (such as fixed-positioned toolbars or sidebars)
    or simply to put more breathing room
    between a targetted element and the edges of the scrollport.</p>
   <p>The <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding③">scroll-padding</a> property is a <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#shorthand-property" id="ref-for-shorthand-property">shorthand property</a> that sets
    all of the <a href="#longhands"><span class="css">scroll-padding-*</span> longhands</a> in one declaration,
    assigning values to the longhands representing each side
    exactly as the <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-box-3/#propdef-padding" id="ref-for-propdef-padding">padding</a> property does for its longhands.
    Values have the following meanings:</p>
   <dl>
    <dt data-md><dfn class="css" data-dfn-for="scroll-padding, scroll-padding-inline, scroll-padding-inline-start, scroll-padding-inline-end, scroll-padding-block, scroll-padding-block-start, scroll-padding-block-end" data-dfn-type="value" data-export id="valdef-scroll-padding-length-percentage"><a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage②">&lt;length-percentage></a><a class="self-link" href="#valdef-scroll-padding-length-percentage"></a></dfn>
    <dd data-md>
     <p>Defines an inward offset from the corresponding edge of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollport" id="ref-for-scrollport①">scrollport</a>.</p>
    <dt data-md><dfn class="dfn-paneled css" data-dfn-for="scroll-padding, scroll-padding-inline, scroll-padding-inline-start, scroll-padding-inline-end, scroll-padding-block, scroll-padding-block-start, scroll-padding-block-end" data-dfn-type="value" data-export id="valdef-scroll-padding-auto">auto</dfn>
    <dd data-md>
     <p>Indicates that the offset for the corresponding edge of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollport" id="ref-for-scrollport②">scrollport</a> is UA-determined.
This should generally default to a used length of <span class="css">0px</span>,
but UAs may use heuristics to detect when a non-zero value is more appropriate.</p>
     <div class="example" id="example-71c18b16"><a class="self-link" href="#example-71c18b16"></a> For example, a UA could detect when a <span class="css">position:fixed</span> element
    is being used as an opaque unscrollable “header”
    that obscures the content below it,
    and resolve the top offset to the height of that element
    so that a “page down” operation (such as pressing <kbd>PgDn</kbd>)
    automatically scrolls by one “visible page” of content. </div>
   </dl>
   <p>These offsets reduce the region of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollport" id="ref-for-scrollport③">scrollport</a> that is considered “viewable” <em>for scrolling operations</em>:
    they have no effect on layout,
    on the scroll origin or initial position,
    or on whether or not an element is considered actually <em>visible</em>,
    but should
    affect whether an element or the caret is considered scrolled into view,
    and reduce the amount of scrolling for paging operations
    (such as using the <kbd>PgUp</kbd> and <kbd>PgDn</kbd> keys
    or triggering equivalent operations from the scrollbar)
    so that within the <a data-link-type="dfn" href="#optimal-viewing-region" id="ref-for-optimal-viewing-region①">optimal viewing region</a> of the <span id="ref-for-scrollport④">scrollport</span> the user sees a continuous stream of content.</p>
   <p>For a <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container④">scroll snap container</a> this region also defines
    the <dfn class="dfn-paneled" data-dfn-type="dfn" data-local-lt="snapport" data-noexport id="scroll-snapport">scroll snapport</dfn>—<wbr>the area of the scrollport that is used as the <a data-link-type="dfn" href="https://www.w3.org/TR/css3-align/#alignment-container" id="ref-for-alignment-container①">alignment container</a> for the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area②">scroll snap areas</a> when calculating <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position①⑨">snap positions</a>.</p>
   <div class="example" id="example-22bb626b">
    <a class="self-link" href="#example-22bb626b"></a> In this example, <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding④">scroll-padding</a> is used to center slideshow images
        within the portion of the scrollport
        that is not obscured by a fixed-position toolbar. 
<pre class="lang-css highlight"><c- f>html </c-><c- p>{</c->
    <c- k>overflow-x</c-><c- p>:</c-> auto<c- p>;</c->
    <c- k>overflow-y</c-><c- p>:</c-> hidden<c- p>;</c->
    <c- k>scroll-snap-type</c-><c- p>:</c-> x mandatory<c- p>;</c->
    <c- k>scroll-padding</c-><c- p>:</c-> <c- m>0</c-> <c- m>500</c-><c- l>px</c-> <c- m>0</c-> <c- m>0</c-><c- p>;</c->
<c- p>}</c->
<c- f>.toolbar </c-><c- p>{</c->
    <c- k>position</c-><c- p>:</c-> fixed<c- p>;</c->
    <c- k>height</c-><c- p>:</c-> <c- m>100</c-><c- l>%</c-><c- p>;</c->
    <c- k>width</c-><c- p>:</c-> <c- m>500</c-><c- l>px</c-><c- p>;</c->
    <c- k>right</c-><c- p>:</c-> <c- m>0</c-><c- p>;</c->
<c- p>}</c->
<c- f>img </c-><c- p>{</c->
    <c- k>scroll-snap-align</c-><c- p>:</c-> none center<c- p>;</c->
<c- p>}</c->
</pre>
   </div>
   <p>UAs must apply the <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding⑤">scroll-padding</a> values set on the root element
    to the document viewport.
    (Note that, unlike <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-overflow-3/#propdef-overflow" id="ref-for-propdef-overflow①">overflow</a>, <span class="property" id="ref-for-propdef-scroll-padding⑥">scroll-padding</span> values are <em>not</em> propagated from HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element" id="ref-for-the-body-element①">body</a></code>.)</p>
   <h2 class="heading settled" data-level="5" id="properties-on-the-elements"><span class="secno">5. </span><span class="content">Aligning Scroll Snap Areas:  Properties on the elements</span><a class="self-link" href="#properties-on-the-elements"></a></h2>
   <h3 class="heading settled" data-level="5.1" id="scroll-margin"><span class="secno">5.1. </span><span class="content">Scroll Snapping Area: the <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin②">scroll-margin</a> property</span><a class="self-link" href="#scroll-margin"></a></h3>
   <table class="def propdef" data-link-for-hint="scroll-margin">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-margin">scroll-margin</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod"><a class="production css" data-link-type="type" href="https://www.w3.org/TR/css3-values/#length-value" id="ref-for-length-value" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a><a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#mult-num-range" id="ref-for-mult-num-range①">{1,4}</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>0 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>per side, an absolute length 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value type 
   </table>
   <p>This property is a <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#shorthand-property" id="ref-for-shorthand-property①">shorthand property</a> that sets
    all of the <a href="#longhands"><span class="css">scroll-margin-*</span> longhands</a> in one declaration,
    assigning values to the longhands representing each side
    exactly as the <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-box-3/#propdef-margin" id="ref-for-propdef-margin">margin</a> property does for its longhands.</p>
   <p>Values represent outsets defining the <dfn class="dfn-paneled" data-dfn-type="dfn" data-local-lt="snap area" data-noexport id="scroll-snap-area">scroll snap area</dfn> that is used for snapping this box to the snapport.
    The <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area③">scroll snap area</a> is determined by taking the transformed border box,
    finding its rectangular bounding box
    (axis-aligned in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container②⑨">scroll container’s</a> coordinate space),
    then adding the specified outsets.</p>
   <p class="note" role="note"><span>Note:</span> This ensures that the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area④">scroll snap area</a> is always rectangular
    and axis-aligned to the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③⓪">scroll container’s</a> coordinate space.</p>
   <p>If a page is navigated to a fragment that defines a target element
    (one that would be matched by <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors4/#target-pseudo" id="ref-for-target-pseudo">:target</a>,
    or the target of <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview" id="ref-for-dom-element-scrollintoview">scrollIntoView()</a></code>),
    the UA should use the element’s <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area⑤">scroll snap area</a>,
    rather than just its border box,
    to determine which area of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollable-overflow-region" id="ref-for-scrollable-overflow-region">scrollable overflow region</a> to bring into view, <em>even when snapping is off
    or not applied on this element</em>.</p>
   <h3 class="heading settled" data-level="5.2" id="scroll-snap-align"><span class="secno">5.2. </span><span class="content">Scroll Snapping Alignment: the <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-align" id="ref-for-propdef-scroll-snap-align①">scroll-snap-align</a> property</span><a class="self-link" href="#scroll-snap-align"></a></h3>
   <table class="def propdef" data-link-for-hint="scroll-snap-align">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-snap-align">scroll-snap-align</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">[ none <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one⑦">|</a> start <span id="ref-for-comb-one⑧">|</span> end <span id="ref-for-comb-one⑨">|</span> center ]<a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#mult-num-range" id="ref-for-mult-num-range②">{1,2}</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>none 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>two keywords 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-align" id="ref-for-propdef-scroll-snap-align②">scroll-snap-align</a> property specifies
    the box’s <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position②⓪">snap position</a> as an alignment of
    its <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area⑥">snap area</a> (as the <a data-link-type="dfn" href="https://www.w3.org/TR/css3-align/#alignment-subject" id="ref-for-alignment-subject①">alignment subject</a>)
    within its <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container⑤">snap container’s</a> <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport②">snapport</a> (as the <a data-link-type="dfn" href="https://www.w3.org/TR/css3-align/#alignment-container" id="ref-for-alignment-container②">alignment container</a>).
    The two values specify the snapping alignment
    in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#block-axis" id="ref-for-block-axis①">block axis</a> and <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#inline-axis" id="ref-for-inline-axis">inline axis</a>, respectively.
    If only one value is specified, the second value defaults to the same value.</p>
   <p>Values are defined as follows:</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="scroll-snap-align" data-dfn-type="value" data-export id="valdef-scroll-snap-align-none">none<a class="self-link" href="#valdef-scroll-snap-align-none"></a></dfn> 
    <dd> This box does not define a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position②①">snap position</a> in the specified axis. 
    <dt><dfn class="css" data-dfn-for="scroll-snap-align" data-dfn-type="value" data-export id="valdef-scroll-snap-align-start">start<a class="self-link" href="#valdef-scroll-snap-align-start"></a></dfn> 
    <dd> Start alignment of this box’s <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area⑦">scroll snap area</a> within the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③①">scroll container</a>’s <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport③">snapport</a> is a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position②②">snap position</a> in the specified axis. 
    <dt><dfn class="css" data-dfn-for="scroll-snap-align" data-dfn-type="value" data-export id="valdef-scroll-snap-align-end">end<a class="self-link" href="#valdef-scroll-snap-align-end"></a></dfn> 
    <dd> End alignment of this box’s <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area⑧">scroll snap area</a> within the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③②">scroll container</a>’s <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport④">snapport</a> is a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position②③">snap position</a> in the specified axis. 
    <dt><dfn class="css" data-dfn-for="scroll-snap-align" data-dfn-type="value" data-export id="valdef-scroll-snap-align-center">center<a class="self-link" href="#valdef-scroll-snap-align-center"></a></dfn> 
    <dd> Center alignment of this box’s <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area⑨">scroll snap area</a> within the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③③">scroll container</a>’s <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport⑤">snapport</a> is a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position②④">snap position</a> in the specified axis. 
   </dl>
   <h4 class="heading settled" data-level="5.2.1" id="snap-scope"><span class="secno">5.2.1. </span><span class="content"> Scoping Valid Snap Positions to Visible Boxes</span><a class="self-link" href="#snap-scope"></a></h4>
   <p>Since the purpose of scroll snapping is to align content within the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollport" id="ref-for-scrollport⑤">scrollport</a> for optimal viewing,
    a scroll position cannot be considered a valid <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position②⑤">snap position</a> if <a data-link-type="dfn" href="#snap" id="ref-for-snap①④">snapping</a> to it would leave the contributing <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area①⓪">snap area</a> entirely outside the <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport⑥">snapport</a>,
    even if it otherwise satisfies the required alignment of the <span id="ref-for-scroll-snap-area①①">snap area</span>.</p>
   <div class="example" id="example-40897215">
    <a class="self-link" href="#example-40897215"></a> For example, a <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area①②">snap area</a> is top-aligned to the <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport⑦">snapport</a> if its top edge is coincident with the <span id="ref-for-scroll-snapport⑧">snapport</span>’s top edge;
        and this would be considered a valid <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position②⑥">snap position</a> for block-axis start-aligned snapping of that <span id="ref-for-scroll-snap-area①③">snap area</span> <em>if at least part of the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area①④">snap area</a> is on-screen</em>.
        If the entire <span id="ref-for-scroll-snap-area①⑤">snap area</span> is outside the <span id="ref-for-scroll-snapport⑨">snapport</span>, however,
        then the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③④">scroll container</a> cannot be considered to be <a data-link-type="dfn" href="#snap" id="ref-for-snap①⑤">snapped</a> because the required alignment, though satisfied, would not be relevant to the viewer. 
    <figure>
<pre class="ascii-art">╔════viewport════╗┈┈┈┈┈┈┈┈┌──────────────┐
║  ┌─────┐ ┌──┐  ║        │ top-snapping │
║  ├──┐  │ └──┘  ║        │   element    │
║  └──┴──┘       ║        │              │
╚════════════════╝        │              │
                          └──────────────┘
</pre>
     <figcaption> Alignment of an off-screen element
              is not considered <a data-link-type="dfn" href="#snap" id="ref-for-snap①⑥">snapping</a>. </figcaption>
    </figure>
   </div>
   <details class="note">
    <summary>Why limit snapping to only when the element is visible?</summary>
     As the <a href="https://www.webkit.org/blog/4017/scroll-snapping-with-css-snap-points/">WebKit implementers point out</a>,
        extending a snap edge infinitely across the canvas
        only allows for snapping gridded layouts,
        and produces odd behavior for the user
        when off-screen elements do not align
        with on-screen elements.
        (If this requirement is onerous for implementers however,
        we can default to a gridded behavior
        and introduce a switch to get smarter behavior later.) 
   </details>
   <p class="note" role="note"><span>Note:</span> Although <a class="css" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type⑦">scroll-snap-type: both</a> evaluates <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position②⑦">snap positions</a> independently in each axis, <a href="#choosing">choosing</a> of a <span id="ref-for-scroll-snap-position②⑧">snap position</span> in one axis
    can be influenced by <span id="ref-for-scroll-snap-position②⑨">snap positions</span> in the other axis.
    For example, snapping in one axis
    may push off-screen the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area①⑥">snap area</a> that the other axis would otherwise align to,
    making its <span id="ref-for-scroll-snap-position③⓪">snap position</span> invalid and therefore unchooseable.</p>
   <h4 class="heading settled" data-level="5.2.2" id="snap-overflow"><span class="secno">5.2.2. </span><span class="content"> Snapping Boxes that Overflow the Scrollport</span><a class="self-link" href="#snap-overflow"></a></h4>
   <p>If the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area①⑦">snap area</a> is larger than the <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport①⓪">snapport</a> in a particular axis,
    then any scroll position in which the <span id="ref-for-scroll-snap-area①⑧">snap area</span> covers the <span id="ref-for-scroll-snapport①①">snapport</span>,
    and the distance between the geometrically previous and subsequent <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position③①">snap positions</a> in that axis
    is larger than size of the <span id="ref-for-scroll-snapport①②">snapport</span> in that axis,
    is a valid <span id="ref-for-scroll-snap-position③②">snap position</span> in that axis.
    The UA may use the specified alignment as a more precise target
    for certain scroll operations (e.g. explicit paging).</p>
   <div class="example" id="example-8f4980a0">
    <a class="self-link" href="#example-8f4980a0"></a> For example, take the first example in <a href="#examples">§ 2 Motivating Examples</a>,
        which had a photo as the area.
        The author wants mandatory snapping from item to item,
        but if the item happens to be larger than your viewport,
        you want to be able to scroll around the whole thing once you’re over it. 
    <p>Since the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area①⑨">snap area</a> is larger than the <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport①③">snapport</a>,
        while the area fully fills the viewport,
        the container can be scrolled arbitrarily
        and will not try to snap back to its aligned position.
        However, if the container is scrolled such that the area
        no longer fully fills the viewport in an axis,
        the area resists outward scrolling
        until it is scrolled sufficiently
        to trigger snapping to a different <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position③③">snap position</a>.</p>
   </div>
   <div class="example" id="example-2e65c5ac">
    <a class="self-link" href="#example-2e65c5ac"></a> For another example,
        mandatory top-snapping on nested <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-section-element" id="ref-for-the-section-element">section</a></code> elements
        can produce large snapping areas
        (from large top-level sections)
        potentially filled with smaller snapping areas
        (from the subsections).
        When the subsections are small enough,
        they snap normally;
        when they’re longer,
        the viewer can scroll arbitrarily within them,
        or within a large segment of the top-level section that has no subsections to snap to. 
    <figure>
<pre class="ascii-art">┌─ top-level section ─┐ ━┓
│                     │ 1┃
│                     │  ┃
│                     │ ━┩
│                     │  ┆
│                     │  ┆
│┌─── sub-section ───┐│  ╯ ━┓
│└───────────────────┘│    2┃
│┌─── sub-section ───┐│ ━┓  ┃
││                   ││ 3┃ ━┛
│└───────────────────┘│  ┃
│┌─── sub-section ───┐│ ━┛ ━┓
│└───────────────────┘│    4┃
│┌─── sub-section ───┐│ ━┓  ┃
││                   ││ 5┃ ━┛
││                   ││  ┃
││                   ││ ━┩
││                   ││  ┆
││                   ││  ┆
││                   ││  ┆
│└───────────────────┘│  ┆
└─────────────────────┘  ╯
</pre>
     <figcaption> In the figure above,
                the five numbered viewports
                represent the five snap positions
                associated with the top-level section
                and its four subsections.
                Because the first and last snap positions are part of ranges taller than the viewport,
                the viewer is allowed to scroll freely
                between the top and bottom of each range. </figcaption>
    </figure>
    <p class="note" role="note"><span>Note:</span> If the author had instead set mandatory snap positions
        on the <em>headings</em> of each section
        (rather than the sections themselves),
        the contents of the first and fifth sections
        would be partially inaccessible to the user,
        as the heading snap area does not extend to cover the whole section.
        This is why it’s a bad idea to use mandatory snap positions
        on elements that might be widely spaced apart.</p>
   </div>
   <h4 class="heading settled" data-level="5.2.3" id="unreachable"><span class="secno">5.2.3. </span><span class="content"> Unreachable Snap Positions</span><a class="self-link" href="#unreachable"></a></h4>
   <p>If a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position③④">snap position</a> is unreachable as specified,
    such that aligning to it would require scrolling the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③⑤">scroll container</a>’s viewport
    past the edge of its <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollable-overflow-region" id="ref-for-scrollable-overflow-region①">scrollable overflow region</a>,
    the <em>used</em> <span id="ref-for-scroll-snap-position③⑤">snap position</span> for this <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area②⓪">snap area</a> is the position resulting from scrolling <em>as much as possible</em> in each relevant axis
    toward the desired <span id="ref-for-scroll-snap-position③⑥">snap position</span>.</p>
   <h3 class="heading settled" data-level="5.3" id="scroll-snap-stop"><span class="secno">5.3. </span><span class="content">Scroll Snap Limits: the <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-stop" id="ref-for-propdef-scroll-snap-stop①">scroll-snap-stop</a> property</span><a class="self-link" href="#scroll-snap-stop"></a></h3>
   <table class="def propdef" data-link-for-hint="scroll-snap-stop">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-snap-stop">scroll-snap-stop</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">normal <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①⓪">|</a> always 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>normal 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>specified keyword 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete 
   </table>
   <p>When scrolling with an intended direction,
    the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③⑥">scroll container</a> can “pass over” several possible <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position③⑦">snap positions</a> (that would be valid to snap to,
    if the scrolling operation used the same direction
    but a lesser distance)
    before reaching the natural endpoint of the scroll operation
    and selecting its final <a data-link-type="dfn">scroll position</a>.
    The <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-stop" id="ref-for-propdef-scroll-snap-stop②">scroll-snap-stop</a> property allows such a possible <span id="ref-for-scroll-snap-position③⑧">snap position</span> to “trap” the scrolling operation,
    forcing the <span id="ref-for-scroll-container③⑦">scroll container</span> to stop
    before the scrolling operation would naturally end.</p>
   <p>Values are defined as follows:</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="scroll-snap-stop" data-dfn-type="value" data-export id="valdef-scroll-snap-stop-normal">normal<a class="self-link" href="#valdef-scroll-snap-stop-normal"></a></dfn> 
    <dd> The <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③⑧">scroll container</a> may pass over a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position③⑨">snap position</a> defined
            by this element during the execution of a scrolling operation. 
    <dt><dfn class="css" data-dfn-for="scroll-snap-stop" data-dfn-type="value" data-export id="valdef-scroll-snap-stop-always">always<a class="self-link" href="#valdef-scroll-snap-stop-always"></a></dfn> 
    <dd> The <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container③⑨">scroll container</a> must not pass over a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position④⓪">snap position</a> defined by this element during the execution of a scrolling operation;
            it must instead snap to the first of this element’s <span id="ref-for-scroll-snap-position④①">snap positions</span>. 
   </dl>
   <p>This property has no effect on scrolling operations with only an <a data-link-type="dfn" href="#intended-end-position" id="ref-for-intended-end-position">intended end position</a>,
    as they do not conceptually “pass over” any <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position④②">snap positions</a>.</p>
   <h2 class="heading settled" data-level="6" id="snap-concepts"><span class="secno">6. </span><span class="content">Snapping Mechanics</span><a class="self-link" href="#snap-concepts"></a></h2>
   <p>The precise model algorithm to select a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position④③">snap position</a> to snap to
    is intentionally left mostly undefined,
    so that user agents can take into account sophisticated models of user intention and interaction
    and adjust how they respond over time,
    to best serve the user.</p>
   <p>This section defines some useful concepts to aid in discussing scroll-snapping mechanics,
    and provides some guidelines for what an effective scroll-snapping strategy might look like.
    User agents are encouraged to adapt this guidance
    and apply their own best judgement
    when defining their own snapping behavior.
    It also provides a small number of behavior requirements,
    to ensure a minimum reasonable behavior that authors can depend on
    when designing their interfaces with scroll-snapping in mind.</p>
   <h3 class="heading settled" data-level="6.1" id="scroll-types"><span class="secno">6.1. </span><span class="content">Types of Scrolling Methods</span><a class="self-link" href="#scroll-types"></a></h3>
   <p>When a page is scrolled,
    the action is performed with
    an intended end position
    and/or an intended direction.
    Each combination of these two things
    defines a distinct category of scrolling,
    which can be treated slightly differently:</p>
   <dl>
    <dt data-md><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="intended-end-position">intended end position</dfn>
    <dd data-md>
     <div class="example" id="example-3822aa28">
      <a class="self-link" href="#example-3822aa28"></a> Common examples of scrolls with only an <a data-link-type="dfn" href="#intended-end-position" id="ref-for-intended-end-position①">intended end position</a> include: 
      <ul>
       <li data-md>
        <p>a panning gesture,
released without momentum</p>
       <li data-md>
        <p>manipulating the scrollbar “thumb” explicitly</p>
       <li data-md>
        <p>programmatically scrolling via APIs such as <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/cssom-view/#dom-window-scrollto" id="ref-for-dom-window-scrollto①">scrollTo()</a></code></p>
       <li data-md>
        <p>tabbing through the document’s focusable elements</p>
       <li data-md>
        <p>navigating to an anchor within the page</p>
       <li data-md>
        <p>homing operations such as the <kbd>Home</kbd>/<kbd>End</kbd> keys</p>
      </ul>
     </div>
    <dt data-md><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="intended-direction-and-end-position">intended direction and end position</dfn>
    <dd data-md>
     <div class="example" id="example-f50b3650">
      <a class="self-link" href="#example-f50b3650"></a> Common examples of scrolls with both an <a data-link-type="dfn" href="#intended-direction-and-end-position" id="ref-for-intended-direction-and-end-position">intended direction and end position</a> include: 
      <ul>
       <li data-md>
        <p>a “fling” gesture,
interpreted with momentum</p>
       <li data-md>
        <p>programmatically scrolling via APIs such as <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/cssom-view/#dom-window-scrollby" id="ref-for-dom-window-scrollby">scrollBy()</a></code></p>
       <li data-md>
        <p>paging operations such as the <kbd>PgUp</kbd>/<kbd>PgDn</kbd> keys (or equivalent operations on the scrollbar)</p>
      </ul>
     </div>
     <p>The intended end point of the scroll prior to intervention from features such
as snap points is its <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="natural-end-point">natural end-point</dfn>.</p>
    <dt data-md><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="intended-direction">intended direction</dfn>
    <dd data-md>
     <div class="example" id="example-33cf1041">
      <a class="self-link" href="#example-33cf1041"></a> Common examples of scrolls with only an <a data-link-type="dfn" href="#intended-direction" id="ref-for-intended-direction">intended direction</a> include: 
      <ul>
       <li data-md>
        <p>pressing an arrow key on the keyboard (or equivalent operations on the scrollbar)</p>
       <li data-md>
        <p>a swiping gesture interpreted as a fixed (rather than inertial) scroll</p>
      </ul>
     </div>
   </dl>
   <p>Additionally, because page layouts usually align things vertically and/or horizontally,
    UAs sometimes <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="axis-lock">axis-lock</dfn> a scroll when its direction
    is sufficiently vertical or horizontal.
    An <a data-link-type="dfn" href="#axis-lock" id="ref-for-axis-lock">axis-locked</a> scroll is bound to only scroll along that axis.
    This prevents less-precise input mechanisms from drifting in the non-primary axis.</p>
   <p class="note" role="note"><span>Note:</span> This specification only applies to scrolling methods supported by the user agent;
    it does not require the user agent to support any particular input or scrolling method.</p>
   <h3 class="heading settled" data-level="6.2" id="choosing"><span class="secno">6.2. </span><span class="content">Choosing Snap Positions</span><a class="self-link" href="#choosing"></a></h3>
   <p>A <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container④⓪">scroll container</a> can have many <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area②①">snap areas</a> scattered throughout its <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollable-overflow-region" id="ref-for-scrollable-overflow-region②">scrollable overflow region</a>.
    A naïve algorithm for selecting a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position④④">snap position</a> can produce behavior that is unintuitive for users,
    so care is required when designing a selection algorithm.
    Here are a few pointers that can aid in the selection process:</p>
   <ul>
    <li data-md>
     <p><a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position④⑤">Snap positions</a> should be chosen to minimize the distance between the end-point
(or the <a data-link-type="dfn" href="#natural-end-point" id="ref-for-natural-end-point">natural end-point</a>)
and the final snapped scroll position,
subject to the additional constraints listed in this section.</p>
    <li data-md>
     <p>If a scroll is <a data-link-type="dfn" href="#axis-lock" id="ref-for-axis-lock①">axis-locked</a>,
any <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position④⑥">snap positions</a> in the other axis should be ignored
during the scroll.
(However, <span id="ref-for-scroll-snap-position④⑦">snap positions</span> in the other axis can still effect the final scroll position.)</p>
    <li data-md>
     <p>In order to prevent a far-offscreen element
from having difficult-to-understand effects
on the scroll position, <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position④⑧">snap positions</a> should be ignored if their elements are far outside of the “corridor”
that the <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport①④">snapport</a> defines as it moves through the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollable-overflow-region" id="ref-for-scrollable-overflow-region③">scrollable overflow region</a>,
or a hypothetical “corridor” in the direction of a scroll with only an <a data-link-type="dfn" href="#intended-direction" id="ref-for-intended-direction①">intended direction</a>,
or the <span id="ref-for-scroll-snapport①⑤">snapport</span> after an scroll with only an <a data-link-type="dfn" href="#intended-end-position" id="ref-for-intended-end-position②">intended end position</a>.</p>
    <li data-md>
     <p>User agents <em>must</em> ensure that a user can “escape” a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position④⑨">snap position</a>,
regardless of the scroll method.
For example, if the snap type is <a class="css" data-link-type="maybe" href="#valdef-scroll-snap-type-mandatory" id="ref-for-valdef-scroll-snap-type-mandatory②">mandatory</a> and the next <span id="ref-for-scroll-snap-position⑤⓪">snap position</span> is more than two screen-widths away,
a naïve “always snap to nearest” selection algorithm might “trap” the user
if their end position was only one screen-width away.
Instead, a smarter algorithm that only returned to the starting <span id="ref-for-scroll-snap-position⑤①">snap position</span> if the end-point was a fairly small distance from it,
and otherwise ignored the starting snap position,
would give better behavior.</p>
     <p>(This implies that a scroll with only an <a data-link-type="dfn" href="#intended-direction" id="ref-for-intended-direction②">intended direction</a> must always ignore the starting <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position⑤②">snap positions</a>.)</p>
    <li data-md>
     <p>If a page is navigated to a fragment that defines a target element
(e.g. one that would be matched by <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors4/#target-pseudo" id="ref-for-target-pseudo①">:target</a>,
or the target of <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview" id="ref-for-dom-element-scrollintoview①">scrollIntoView()</a></code>),
and that element defines some <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position⑤③">snap positions</a>,
the user agent must <a data-link-type="dfn" href="#snap" id="ref-for-snap①⑦">snap</a> to one of that element’s <span id="ref-for-scroll-snap-position⑤④">snap positions</span> if its nearest <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container④①">scroll container</a> is a <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container⑥">scroll snap container</a>.
The user agent <em>may</em> also do this even when the <span id="ref-for-scroll-container④②">scroll container</span> has <a class="css" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type⑧">scroll-snap-type: none</a>.</p>
   </ul>
   <h2 class="heading settled" id="longhands"><span class="content">Appendix A: Longhands</span><a class="self-link" href="#longhands"></a></h2>
   <p>The physical and logical longhands (and their shorthands)
interact as defined in <a data-link-type="biblio" href="#biblio-css-logical-1">[CSS-LOGICAL-1]</a>.</p>
   <h3 class="heading settled" id="padding-longhands-physical"><span class="content">Physical Longhands for <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding⑦">scroll-padding</a></span><a class="self-link" href="#padding-longhands-physical"></a></h3>
   <table class="def propdef" data-link-for-hint="scroll-padding-top">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-padding-top">scroll-padding-top<a class="self-link" href="#propdef-scroll-padding-top"></a></dfn>, <dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-padding-right">scroll-padding-right<a class="self-link" href="#propdef-scroll-padding-right"></a></dfn>, <dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-padding-bottom">scroll-padding-bottom<a class="self-link" href="#propdef-scroll-padding-bottom"></a></dfn>, <dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-padding-left">scroll-padding-left<a class="self-link" href="#propdef-scroll-padding-left"></a></dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">auto <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①①">|</a> <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage③">&lt;length-percentage></a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>auto 
     <tr>
      <th>Applies to:
      <td><a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container④③">scroll containers</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>relative to the scroll container’s scrollport 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>the keyword <a class="css" data-link-type="maybe" href="#valdef-scroll-padding-auto" id="ref-for-valdef-scroll-padding-auto①">auto</a> or a computed <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage④">&lt;length-percentage></a> value 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value type 
   </table>
   <p>These <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#longhand" id="ref-for-longhand">longhands</a> of <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding⑧">scroll-padding</a> specify
    the top, right, bottom, and left edges
    of the <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport①⑥">snapport</a>, respectively.
    Negative values are invalid.</p>
   <h3 class="heading settled" id="padding-longhands-logical"><span class="content">Flow-relative Longhands for <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding⑨">scroll-padding</a></span><a class="self-link" href="#padding-longhands-logical"></a></h3>
   <table class="def propdef" data-link-for-hint="scroll-padding-inline-start">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-padding-inline-start">scroll-padding-inline-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-padding-block-start">scroll-padding-block-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-padding-inline-end">scroll-padding-inline-end</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-padding-block-end">scroll-padding-block-end</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">auto <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①②">|</a> <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage⑤">&lt;length-percentage></a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>auto 
     <tr>
      <th>Applies to:
      <td><a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container④④">scroll containers</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>relative to the scroll container’s scrollport 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>the keyword <a class="css" data-link-type="maybe" href="#valdef-scroll-padding-auto" id="ref-for-valdef-scroll-padding-auto②">auto</a> or a computed <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage⑥">&lt;length-percentage></a> value 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value type 
   </table>
   <p>These <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#longhand" id="ref-for-longhand①">longhands</a> of <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①⓪">scroll-padding</a> specify
    the block-start, inline-start, block-end, and inline-end edges
    of the <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport①⑦">snapport</a>, respectively.
    Negative values are invalid.</p>
   <table class="def propdef" data-link-for-hint="scroll-padding-block">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-padding-block">scroll-padding-block<a class="self-link" href="#propdef-scroll-padding-block"></a></dfn>, <dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-padding-inline">scroll-padding-inline<a class="self-link" href="#propdef-scroll-padding-inline"></a></dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">[ auto <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①③">|</a> <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage⑦">&lt;length-percentage></a> ]<a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#mult-num-range" id="ref-for-mult-num-range③">{1,2}</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>auto 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>relative to the scroll container’s scrollport 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>see individual properties 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value 
     <tr>
      <th>Canonical order:
      <td>per grammar 
   </table>
   <p>These <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#shorthand-property" id="ref-for-shorthand-property②">shorthands</a> of <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding-block-start" id="ref-for-propdef-scroll-padding-block-start">scroll-padding-block-start</a> + <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding-block-end" id="ref-for-propdef-scroll-padding-block-end">scroll-padding-block-end</a> and <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding-inline-start" id="ref-for-propdef-scroll-padding-inline-start">scroll-padding-inline-start</a> + <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding-inline-end" id="ref-for-propdef-scroll-padding-inline-end">scroll-padding-inline-end</a> are <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#longhand" id="ref-for-longhand②">longhands</a> of <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①①">scroll-padding</a>,
    and specify the block-axis and inline-axis edges of the <a data-link-type="dfn" href="#scroll-snapport" id="ref-for-scroll-snapport①⑧">snapport</a>, respectively.</p>
   <p>If two values are specified, the first gives the start value
    and the second gives the end value.</p>
   <h3 class="heading settled" id="margin-longhands-physical"><span class="content">Physical Longhands for <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin③">scroll-margin</a></span><a class="self-link" href="#margin-longhands-physical"></a></h3>
   <table class="def propdef" data-link-for-hint="scroll-margin-top">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-margin-top">scroll-margin-top<a class="self-link" href="#propdef-scroll-margin-top"></a></dfn>, <dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-margin-right">scroll-margin-right<a class="self-link" href="#propdef-scroll-margin-right"></a></dfn>, <dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-margin-bottom">scroll-margin-bottom<a class="self-link" href="#propdef-scroll-margin-bottom"></a></dfn>, <dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-margin-left">scroll-margin-left<a class="self-link" href="#propdef-scroll-margin-left"></a></dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod"><a class="production css" data-link-type="type" href="https://www.w3.org/TR/css3-values/#length-value" id="ref-for-length-value①" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>0 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>absolute length 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value type 
   </table>
   <p>These <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#longhand" id="ref-for-longhand③">longhands</a> of <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin④">scroll-margin</a> specify
    the top, right, bottom, and left edges
    of the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area②②">scroll snap area</a>, respectively.</p>
   <h3 class="heading settled" id="margin-longhands-logical"><span class="content">Flow-relative Longhands for <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin⑤">scroll-margin</a></span><a class="self-link" href="#margin-longhands-logical"></a></h3>
   <table class="def propdef" data-link-for-hint="scroll-margin-block-start">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-margin-block-start">scroll-margin-block-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-margin-inline-start">scroll-margin-inline-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-margin-block-end">scroll-margin-block-end</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-margin-inline-end">scroll-margin-inline-end</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod"><a class="production css" data-link-type="type" href="https://www.w3.org/TR/css3-values/#length-value" id="ref-for-length-value②" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>0 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>absolute length 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value type 
   </table>
   <p>These <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#longhand" id="ref-for-longhand④">longhands</a> of <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin⑥">scroll-margin</a> specify the
    block-start, inline-start, block-end, and inline-end edges
    of the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area②③">scroll snap area</a>, respectively.</p>
   <table class="def propdef" data-link-for-hint="scroll-margin-block">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-margin-block">scroll-margin-block<a class="self-link" href="#propdef-scroll-margin-block"></a></dfn>, <dfn class="css" data-dfn-type="property" data-export id="propdef-scroll-margin-inline">scroll-margin-inline<a class="self-link" href="#propdef-scroll-margin-inline"></a></dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod"><a class="production css" data-link-type="type" href="https://www.w3.org/TR/css3-values/#length-value" id="ref-for-length-value③" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a><a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#mult-num-range" id="ref-for-mult-num-range④">{1,2}</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>0 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>see individual properties 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value type 
     <tr>
      <th>Canonical order:
      <td>per grammar 
   </table>
   <p>These <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#shorthand-property" id="ref-for-shorthand-property③">shorthands</a> of <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin-block-start" id="ref-for-propdef-scroll-margin-block-start">scroll-margin-block-start</a> + <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin-block-end" id="ref-for-propdef-scroll-margin-block-end">scroll-margin-block-end</a> and <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin-inline-start" id="ref-for-propdef-scroll-margin-inline-start">scroll-margin-inline-start</a> + <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin-inline-end" id="ref-for-propdef-scroll-margin-inline-end">scroll-margin-inline-end</a> are <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-4/#longhand" id="ref-for-longhand⑤">longhands</a> of <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin⑦">scroll-margin</a>,
    and specify the block-axis and inline-axis edges
    of the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area②④">scroll snap area</a>, respectively.</p>
   <p>If two values are specified, the first gives the start value
    and the second gives the end value.</p>
   <h2 class="heading settled" data-level="7" id="priv-sec"><span class="secno">7. </span><span class="content">Privacy and Security Considerations</span><a class="self-link" href="#priv-sec"></a></h2>
   <p>This specification does not expose any information whatsoever
    that is not already exposed to the DOM directly;
    it just makes scrolling slightly more functional.
    There are no new privacy or security considerations.</p>
   <h2 class="heading settled" data-level="8" id="acknowledgements"><span class="secno">8. </span><span class="content">Acknowledgements</span><a class="self-link" href="#acknowledgements"></a></h2>
   <p>Many thanks to
    David Baron,
    Simon Fraser,
    Håkon Wium Lie,
    Theresa O’Connor,
    François Remy,
    Majid Valpour,
    and most especially Robert O’Callahan
    for their proposals and recommendations,
    which have been incorporated into this document.</p>
   <h2 class="heading settled" data-level="9" id="changes"><span class="secno">9. </span><span class="content">Changes</span><a class="self-link" href="#changes"></a></h2>
   <h3 class="heading settled" data-level="9.1" id="changes-20190131"><span class="secno">9.1. </span><span class="content">Changes Since 31 January 2019 CR</span><a class="self-link" href="#changes-20190131"></a></h3>
   <p>Changes since the <a href="https://www.w3.org/TR/2019/CR-css-scroll-snap-1-20190131/">31 January 2019 Candidate Recommendation</a> include:</p>
   <ul>
    <li id="change-2019-clarify-nonsnapping">
     <a class="self-link" href="#change-2019-clarify-nonsnapping"></a> Emphasized that <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①②">scroll-padding</a> and <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin⑧">scroll-margin</a> do apply
			even when scroll snapping is off.
			(<a href="https://github.com/w3c/csswg-drafts/issues/3721">Issue 3721</a>) 
     <blockquote>
      <p>
       <ins>Also, to offer better control over paging and scroll positioning
				even when snapping is off,
				this module defines the <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①③">scroll-padding</a> property
				for use on all <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container④⑤">scroll containers</a>,
				to adjust the <span id="ref-for-scroll-container④⑥">scroll container</span>’s <a data-link-type="dfn" href="#optimal-viewing-region" id="ref-for-optimal-viewing-region②">optimal viewing region</a> for the purpose of paging and scroll-into-view operations;
				similarly the <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin⑨">scroll-margin</a> property can be used on any box
				to adjust its visual area
				for the purpose of scroll-into-view operations.</ins>
      </p>
     </blockquote>
     <blockquote>
      <p>
       This property specifies 
       <ins>(for all <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container④⑦">scroll containers</a>, not just <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container⑦">scroll snap containers</a>)</ins>
        offsets that define the <a data-link-type="dfn" href="#optimal-viewing-region" id="ref-for-optimal-viewing-region③">optimal viewing region</a> of a scrollport…
      </p>
     </blockquote>
     <blockquote>
      <p>
       If a page is navigated to a fragment that defines a target element
				(one that would be matched by <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors4/#target-pseudo" id="ref-for-target-pseudo②">:target</a>,
				or the target of <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview" id="ref-for-dom-element-scrollintoview②">scrollIntoView()</a></code>),
				the UA should use the element’s <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area②⑤">scroll snap area</a>,
				rather than just its border box,
				to determine which area of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollable-overflow-region" id="ref-for-scrollable-overflow-region④">scrollable overflow region</a> to bring into view
       <ins>, <em>even when snapping is off
				or not applied on this element</em></ins>
       .
      </p>
     </blockquote>
    <li id="change-2019-propagation">
     <a class="self-link" href="#change-2019-propagation"></a> Defined explicitly that <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type⑨">scroll-snap-type</a> and <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①④">scroll-padding</a> values
			are propagated from the root element to the document viewport
			as would be expected.
			(<a href="https://github.com/w3c/csswg-drafts/issues/3740">Issue 3740</a>) 
     <blockquote>
      <p>
       <ins>UAs must apply the <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type①⓪">scroll-snap-type</a> value set on the root element
				to the document viewport.
				Note that, unlike <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-overflow-3/#propdef-overflow" id="ref-for-propdef-overflow②">overflow</a>, <span class="property" id="ref-for-propdef-scroll-snap-type①①">scroll-snap-type</span> values are <em>not</em> propagated from HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element" id="ref-for-the-body-element②">body</a></code>.</ins>
      </p>
     </blockquote>
     <blockquote>
      <p>
       <ins>UAs must apply the <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①⑤">scroll-padding</a> values set on the root element
				to the document viewport.
				(Note that, unlike <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-overflow-3/#propdef-overflow" id="ref-for-propdef-overflow③">overflow</a>, <span class="property" id="ref-for-propdef-scroll-padding①⑥">scroll-padding</span> values are <em>not</em> propagated from HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element" id="ref-for-the-body-element③">body</a></code>.)</ins>
      </p>
     </blockquote>
   </ul>
   <p>Changes since the <a href="https://www.w3.org/TR/2018/CR-css-scroll-snap-1-20180814/">14 August 2018 Candidate Recommendation</a> include:</p>
   <ul>
    <li id="change-2018-padding-intial"><a class="self-link" href="#change-2018-padding-intial"></a> Corrected <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①⑦">scroll-padding</a> longhands to list the new <a class="css" data-link-type="maybe" href="#valdef-scroll-padding-auto" id="ref-for-valdef-scroll-padding-auto③">auto</a> keyword in their property definition tables.
			(<a href="https://github.com/w3c/csswg-drafts/issues/3189">Issue 3189</a>) 
    <li id="change-2018-computed-animation"><a class="self-link" href="#change-2018-computed-animation"></a> Fixed up “Computed value” and “Animation type” lines in the property definition tables. 
    <li id="change-2018-margin-percentage"><a class="self-link" href="#change-2018-margin-percentage"></a> Cleaned up stray <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css3-values/#percentage-value" id="ref-for-percentage-value">&lt;percentage></a> values in <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin①⓪">scroll-margin</a> property definition tables.
			(<a href="https://github.com/w3c/csswg-drafts/issues/3289">3289</a>) 
   </ul>
   <p>A <a href="https://drafts.csswg.org/css-scroll-snap-1/issues-cr-2018">Disposition of Comments is available</a>.</p>
   <h3 class="heading settled" data-level="9.2" id="changes-20171214"><span class="secno">9.2. </span><span class="content">Changes Since 14 December 2017 CR</span><a class="self-link" href="#changes-20171214"></a></h3>
   <p>Changes since the <a href="https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20171214/">14 December 2017 Candidate Recommendation</a> include:</p>
   <ul>
    <li id="change-2017-align-values-backwards"><a class="self-link" href="#change-2017-align-values-backwards"></a> Fixed <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-align" id="ref-for-propdef-scroll-snap-align③">scroll-snap-align</a> shorthand to assign
			block-axis value first, inline-axis value second,
			accordingly to logical shorthand conventions.
			(<a href="https://github.com/w3c/csswg-drafts/issues/2232">Issue 2232</a> 
    <li id="change-2017-scroll-padding-auto"><a class="self-link" href="#change-2017-scroll-padding-auto"></a> Added <a class="css" data-link-type="maybe" href="#valdef-scroll-padding-auto" id="ref-for-valdef-scroll-padding-auto④">auto</a> keyword to 'scroll-padding as its initial value
			to account for UA heuristics.
			(<a href="https://github.com/w3c/csswg-drafts/issues/2728">Issue 2728</a> 
    <li id="change-2017-snap-vs-api-scroll">
     <a class="self-link" href="#change-2017-snap-vs-api-scroll"></a> Clarified in the definition of <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type①②">scroll-snap-type</a> that programmatig scrolls such as <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/cssom-view/#dom-window-scrollto" id="ref-for-dom-window-scrollto②">scrollTo()</a></code> are also subject to snapping.
			(<a href="https://github.com/w3c/csswg-drafts/issues/2593">Issue 2593</a>) 
     <blockquote>
       Using the <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type①③">scroll-snap-type</a> property on the relevant <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container④⑧">scroll container</a>,
				the author can request a particular bias
				for the scrollport to land on a <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position⑤⑤">snap position</a> after scrolling operations 
      <ins>(including programmatic scrolls such as the <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/cssom-view/#dom-window-scrollto" id="ref-for-dom-window-scrollto③">scrollTo()</a></code> method)</ins>
      . 
     </blockquote>
    <li id="change-2017-clarify-mandatory-visibility"><a class="self-link" href="#change-2017-clarify-mandatory-visibility"></a> Adjusted wording in <a href="#snap-scope">§ 5.2.1 Scoping Valid Snap Positions to Visible Boxes</a> to be clearer—<wbr>compared to <a href="https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20171214/#snap-scope">old version</a>.
			(<a href="https://github.com/w3c/csswg-drafts/issues/2526">Issue 2526</a>) 
   </ul>
   <p>A <a href="https://drafts.csswg.org/css-scroll-snap-1/issues-cr-2017-12">Disposition of Comments</a> is available.</p>
   <h3 class="heading settled" data-level="9.3" id="changes-20170824"><span class="secno">9.3. </span><span class="content">Changes Since 24 August 2017 CR</span><a class="self-link" href="#changes-20170824"></a></h3>
   <p>Changes since the <a href="https://www.w3.org/TR/2017/CR-css-scroll-snap-1-20170824/">24 August 2017 Candidate Recommendation</a> include:</p>
   <ul>
    <li id="change-2017-scroll-margin">
     <a class="self-link" href="#change-2017-scroll-margin"></a> <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors4/#target-pseudo" id="ref-for-target-pseudo③">:target</a>/<code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview" id="ref-for-dom-element-scrollintoview③">scrollIntoView()</a></code>/etc should take <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin①①">scroll-margin</a> into account,
			regardless of whether snapping is turned on or not.
			(<a href="https://drafts.csswg.org/css-scroll-snap-1/issues-cr-2016-08#issue-1">Issue 1</a> 
     <blockquote>
      <p>
       <ins>If a page is navigated to a fragment that defines a target element
				(one that would be matched by <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors4/#target-pseudo" id="ref-for-target-pseudo④">:target</a>,
				or the target of <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview" id="ref-for-dom-element-scrollintoview④">scrollIntoView()</a></code>),
				the UA should use the element’s <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area②⑥">scroll snap area</a>,
				rather than just its border box,
				to determine which area of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollable-overflow-region" id="ref-for-scrollable-overflow-region⑤">scrollable overflow region</a> to bring into view.</ins>
      </p>
     </blockquote>
    <li id="change-2017-target-snap-must">
     <a class="self-link" href="#change-2017-target-snap-must"></a> <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors4/#target-pseudo" id="ref-for-target-pseudo⑤">:target</a>/<code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview" id="ref-for-dom-element-scrollintoview⑤">scrollIntoView()</a></code>/etc must (rather than should)
			use snap positions if snapping is turned on.
			(<a href="https://drafts.csswg.org/css-scroll-snap-1/issues-cr-2016-08#issue-1">Issue 1</a> 
     <blockquote>
      <p>
       If a page is navigated to a fragment that defines a target element
				(one that would be matched by <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors4/#target-pseudo" id="ref-for-target-pseudo⑥">:target</a>,
				or the target of <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview" id="ref-for-dom-element-scrollintoview⑥">scrollIntoView()</a></code>),
				and that element defines some <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position⑤⑥">snap positions</a>,
				the user agent 
       <del>should</del>
       <ins>must</ins>
        <a data-link-type="dfn" href="#snap" id="ref-for-snap①⑧">snap</a> to one of that element’s <span id="ref-for-scroll-snap-position⑤⑦">snap positions</span> 
       <ins>if its nearest <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container④⑨">scroll container</a> is a <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container⑧">scroll snap container</a></ins>
       .
				The user agent <em>may</em> also do this even when
				the <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container⑤⓪">scroll container</a> has <a class="css" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type①④">scroll-snap-type: none</a>.
      </p>
     </blockquote>
    <li id="change-2017-rename-scroll-margin">
     <a class="self-link" href="#change-2017-rename-scroll-margin"></a> Renamed <span class="css">scroll-snap-margin</span> to <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin①②">scroll-margin</a> to reflect its more generic role in providing breathing space
			for scrolling to an element regardless of snapping behavior.
			(<a href="https://drafts.csswg.org/css-scroll-snap-1/issues-cr-2016-08#issue-4">Issue 4</a>) 
     <p>A <a href="https://drafts.csswg.org/css-scroll-snap-1/issues-cr-2016-08">Disposition of Comments</a> is available.</p>
     <h3 class="heading settled" data-level="9.4" id="changes-20161020"><span class="secno">9.4. </span><span class="content">Changes Since 20 October 2016 CR</span><a class="self-link" href="#changes-20161020"></a></h3>
     <p>Changes since the <a href="https://www.w3.org/TR/2016/CR-css-scroll-snap-1-20161020/">20 October 2016 Candidate Recommendation</a> include:</p>
     <ul>
      <li>
       Restricted <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①⑧">scroll-padding</a> to non-negative values.
			(<a href="https://github.com/w3c/csswg-drafts/issues/1084">Issue 1084</a>) 
       <blockquote>
        <p>
         Values 
         <ins>must be non-negative and</ins>
          are interpreted as for <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-box-3/#propdef-padding" id="ref-for-propdef-padding①">padding</a> …
        </p>
       </blockquote>
      <li>Added paging and homing operations to examples in <a href="#scroll-types">§ 6.1 Types of Scrolling Methods</a>.
			(<a href="https://github.com/w3c/csswg-drafts/issues/1605">Issue 1605</a>) 
      <li>
       Clarified that snapping in one axis may affect whether snapping to a particular snap area is possible in the other axis.
			(<a href="https://github.com/w3c/csswg-drafts/issues/950">Issue 950</a>) 
       <blockquote>
        <ins>
         <p class="note" role="note">Although <a class="css" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type①⑤">scroll-snap-type: both</a> evaluates <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position⑤⑧">snap positions</a> independently in each axis, <a href="#choosing">choosing</a> of a <span id="ref-for-scroll-snap-position⑤⑨">snap position</span> in one axis
                may be influenced by <span id="ref-for-scroll-snap-position⑥⓪">snap positions</span> in the other axis.
                For example, snapping in one axis
                may push off-screen the <a data-link-type="dfn" href="#scroll-snap-area" id="ref-for-scroll-snap-area②⑦">snap area</a> that the other axis would otherwise align to,
                making its <span id="ref-for-scroll-snap-position⑥①">snap position</span> invalid and therefore unchooseable.</p>
        </ins>
       </blockquote>
      <li>Clarified how the <a class="property" data-link-type="propdesc" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding①⑨">scroll-padding</a> and <a class="property" data-link-type="propdesc" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin①③">scroll-margin</a> shorthands
			assign values to their longhands.
			(<a href="https://github.com/w3c/csswg-drafts/issues/1050">Issue 1050</a>) 
      <li>
       Clarified that scroll snapping does not mandate any particular input method.
			(<a href="https://github.com/w3c/csswg-drafts/issues/1305">Issue 1305</a>) 
       <blockquote>
        <ins>
         <p class="note" role="note">This specification only applies to scrolling methods supported by the user agent;
				it does not require the user agent to support any particular input or scrolling method.</p>
        </ins>
       </blockquote>
      <li>Clarified the intended effects of <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-stop" id="ref-for-propdef-scroll-snap-stop③">scroll-snap-stop</a> on various scrolling operations.
			(<a href="https://github.com/w3c/csswg-drafts/issues/1552">Issue 1552</a>) 
      <li>Clarified that <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-stop" id="ref-for-propdef-scroll-snap-stop④">scroll-snap-stop</a> is applied to the <a data-link-type="dfn" href="#scroll-snap-position" id="ref-for-scroll-snap-position⑥②">snap positions</a> defined by the element,
			not applied to all <span id="ref-for-scroll-snap-position⑥③">snap positions</span> in the <a data-link-type="dfn" href="#scroll-snap-container" id="ref-for-scroll-snap-container⑨">scroll snap container</a>. 
      <li>Fixed some syntax errors in examples and added a new one to the <a class="property" data-link-type="propdesc" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type①⑥">scroll-snap-type</a> section.
			(<a href="https://github.com/w3c/csswg-drafts/issues/827">Issue 827</a>) 
     </ul>
     <p>A <a href="https://drafts.csswg.org/css-scroll-snap-1/issues-cr-2016">Disposition of Comments</a> is available.</p>
   </ul>
  </main>
  <h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
  <h3 class="heading settled" id="document-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#document-conventions"></a></h3>
  <p>Conformance requirements are expressed with a combination of
    descriptive assertions and RFC 2119 terminology. The key words “MUST”,
    “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
    “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
    document are to be interpreted as described in RFC 2119.
    However, for readability, these words do not appear in all uppercase
    letters in this specification. </p>
  <p>All of the text of this specification is normative except sections
    explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
  <p>Examples in this specification are introduced with the words “for example”
    or are set apart from the normative text with <code>class="example"</code>,
    like this: </p>
  <div class="example" id="example-ae2b6bc0">
   <a class="self-link" href="#example-ae2b6bc0"></a> 
   <p>This is an example of an informative example. </p>
  </div>
  <p>Informative notes begin with the word “Note” and are set apart from the
    normative text with <code>class="note"</code>, like this: </p>
  <p class="note" role="note">Note, this is an informative note. </p>
  <p>Advisements are normative sections styled to evoke special attention and are
    set apart from other normative text with <code>&lt;strong class="advisement"></code>, like
    this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
  <h3 class="heading settled" id="conform-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#conform-classes"></a></h3>
  <p>Conformance to this specification
    is defined for three conformance classes: </p>
  <dl>
   <dt>style sheet 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#style-sheet">CSS
            style sheet</a>. 
   <dt>renderer 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
            documents that use them. 
   <dt>authoring tool 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that writes a style sheet. 
  </dl>
  <p>A style sheet is conformant to this specification
    if all of its statements that use syntax defined in this module are valid
    according to the generic CSS grammar and the individual grammars of each
    feature defined in this module. </p>
  <p>A renderer is conformant to this specification
    if, in addition to interpreting the style sheet as defined by the
    appropriate specifications, it supports all the features defined
    by this specification by parsing them correctly
    and rendering the document accordingly. However, the inability of a
    UA to correctly render a document due to limitations of the device
    does not make the UA non-conformant. (For example, a UA is not
    required to render color on a monochrome monitor.) </p>
  <p>An authoring tool is conformant to this specification
    if it writes style sheets that are syntactically correct according to the
    generic CSS grammar and the individual grammars of each feature in
    this module, and meet all other conformance requirements of style sheets
    as described in this module. </p>
  <h3 class="heading settled" id="conform-responsible"><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#conform-responsible"></a></h3>
  <p>The following sections define several conformance requirements
        for implementing CSS responsibly,
        in a way that promotes interoperability in the present and future. </p>
  <h4 class="heading settled" id="conform-partial"><span class="content"> Partial Implementations</span><a class="self-link" href="#conform-partial"></a></h4>
  <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
        (and <a href="http://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
        any at-rules, properties, property values, keywords, and other syntactic constructs
        for which they have no usable level of support</strong>.
        In particular, user agents <em>must not</em> selectively ignore
        unsupported property values and honor supported values in a single multi-value property declaration:
        if any value is considered invalid (as unsupported values must be),
        CSS requires that the entire declaration be ignored. </p>
  <h4 class="heading settled" id="conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#conform-future-proofing"></a></h4>
  <p>To avoid clashes with future stable CSS features,
        the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
  <h4 class="heading settled" id="conform-testing"><span class="content"> Implementations of CR-level Features</span><a class="self-link" href="#conform-testing"></a></h4>
  <p>Once a specification reaches the Candidate Recommendation stage,
        implementers should release an <a data-link-type="dfn" href="http://www.w3.org/TR/CSS/#vendor-prefix">unprefixed</a> implementation
        of any CR-level feature they can demonstrate
        to be correctly implemented according to spec,
        and should avoid exposing a prefixed variant of that feature. </p>
  <p>To establish and maintain the interoperability of CSS across
        implementations, the CSS Working Group requests that non-experimental
        CSS renderers submit an implementation report (and, if necessary, the
        testcases used for that implementation report) to the W3C before
        releasing an unprefixed implementation of any CSS features. Testcases
        submitted to W3C are subject to review and correction by the CSS
        Working Group. </p>
  <p>Further information on submitting testcases and implementation reports
        can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
        Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list. </p>
  <h3 class="no-ref heading settled" id="cr-exit-criteria"><span class="content"> CR exit criteria</span><a class="self-link" href="#cr-exit-criteria"></a></h3>
  <p> For this specification to be advanced to Proposed Recommendation,
    there must be at least two independent, interoperable implementations
    of each feature. Each feature may be implemented by a different set of
    products, there is no requirement that all features be implemented by
    a single product. For the purposes of this criterion, we define the
    following terms: </p>
  <dl>
   <dt>independent 
   <dd>each implementation must be developed by a
        different party and cannot share, reuse, or derive from code
        used by another qualifying implementation. Sections of code that
        have no bearing on the implementation of this specification are
        exempt from this requirement. 
   <dt>interoperable 
   <dd>passing the respective test case(s) in the
        official CSS test suite, or, if the implementation is not a Web
        browser, an equivalent test. Every relevant test in the test
        suite should have an equivalent test created if such a user
        agent (UA) is to be used to claim interoperability. In addition
        if such a UA is to be used to claim interoperability, then there
        must one or more additional UAs which can also pass those
        equivalent tests in the same way for the purpose of
        interoperability. The equivalent tests must be made publicly
        available for the purposes of peer review. 
   <dt>implementation 
   <dd>
    a user agent which: 
    <ol class="inline">
     <li>implements the specification. 
     <li>is available to the general public. The implementation may
            be a shipping product or other publicly available version
            (i.e., beta version, preview release, or "nightly build").
            Non-shipping product releases must have implemented the
            feature(s) for a period of at least one month in order to
            demonstrate stability. 
     <li>is not experimental (i.e., a version specifically designed
            to pass the test suite and is not intended for normal usage
            going forward). 
    </ol>
  </dl>
  <p>
   The specification will remain Candidate Recommendation for at least
    six months. 
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </p>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#valdef-scroll-snap-stop-always">always</a><span>, in §5.3</span>
   <li><a href="#valdef-scroll-padding-auto">auto</a><span>, in §4.2</span>
   <li><a href="#axis-lock">axis-lock</a><span>, in §6.1</span>
   <li><a href="#axis-value">axis value</a><span>, in §4.1.1</span>
   <li><a href="#valdef-scroll-snap-type-block">block</a><span>, in §4.1.1</span>
   <li><a href="#valdef-scroll-snap-type-both">both</a><span>, in §4.1.1</span>
   <li><a href="#captures-snap-positions">captures snap positions</a><span>, in §4.1.2</span>
   <li><a href="#valdef-scroll-snap-align-center">center</a><span>, in §5.2</span>
   <li><a href="#valdef-scroll-snap-align-end">end</a><span>, in §5.2</span>
   <li><a href="#valdef-scroll-snap-type-inline">inline</a><span>, in §4.1.1</span>
   <li><a href="#intended-direction">intended direction</a><span>, in §6.1</span>
   <li><a href="#intended-direction-and-end-position">intended direction and end position</a><span>, in §6.1</span>
   <li><a href="#intended-end-position">intended end position</a><span>, in §6.1</span>
   <li><a href="#valdef-scroll-padding-length-percentage">&lt;length-percentage></a><span>, in §4.2</span>
   <li><a href="#valdef-scroll-snap-type-mandatory">mandatory</a><span>, in §4.1.2</span>
   <li><a href="#natural-end-point">natural end-point</a><span>, in §6.1</span>
   <li>
    none
    <ul>
     <li><a href="#valdef-scroll-snap-align-none">value for scroll-snap-align</a><span>, in §5.2</span>
     <li><a href="#valdef-scroll-snap-type-none">value for scroll-snap-type</a><span>, in §4.1.2</span>
    </ul>
   <li><a href="#valdef-scroll-snap-stop-normal">normal</a><span>, in §5.3</span>
   <li><a href="#optimal-viewing-region">optimal viewing region</a><span>, in §4.2</span>
   <li><a href="#valdef-scroll-snap-type-proximity">proximity</a><span>, in §4.1.2</span>
   <li><a href="#propdef-scroll-margin">scroll-margin</a><span>, in §5.1</span>
   <li><a href="#propdef-scroll-margin-block">scroll-margin-block</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-margin-block-end">scroll-margin-block-end</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-margin-block-start">scroll-margin-block-start</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-margin-bottom">scroll-margin-bottom</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-margin-inline">scroll-margin-inline</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-margin-inline-end">scroll-margin-inline-end</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-margin-inline-start">scroll-margin-inline-start</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-margin-left">scroll-margin-left</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-margin-right">scroll-margin-right</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-margin-top">scroll-margin-top</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding">scroll-padding</a><span>, in §4.2</span>
   <li><a href="#propdef-scroll-padding-block">scroll-padding-block</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding-block-end">scroll-padding-block-end</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding-block-start">scroll-padding-block-start</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding-bottom">scroll-padding-bottom</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding-inline">scroll-padding-inline</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding-inline-end">scroll-padding-inline-end</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding-inline-start">scroll-padding-inline-start</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding-left">scroll-padding-left</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding-right">scroll-padding-right</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-padding-top">scroll-padding-top</a><span>, in §Unnumbered section</span>
   <li><a href="#propdef-scroll-snap-align">scroll-snap-align</a><span>, in §5.2</span>
   <li><a href="#scroll-snap-area">scroll snap area</a><span>, in §5.1</span>
   <li><a href="#scroll-snap-container">scroll snap container</a><span>, in §4.1.2</span>
   <li><a href="#scroll-snapport">scroll snapport</a><span>, in §4.2</span>
   <li><a href="#scroll-snap-position">scroll snap position</a><span>, in §3</span>
   <li><a href="#propdef-scroll-snap-stop">scroll-snap-stop</a><span>, in §5.3</span>
   <li><a href="#propdef-scroll-snap-type">scroll-snap-type</a><span>, in §4.1</span>
   <li><a href="#snap">snap</a><span>, in §3</span>
   <li><a href="#scroll-snap-area">snap area</a><span>, in §5.1</span>
   <li><a href="#scroll-snap-container">snap container</a><span>, in §4.1.2</span>
   <li><a href="#snap">snapped</a><span>, in §3</span>
   <li><a href="#snap">snapping</a><span>, in §3</span>
   <li><a href="#scroll-snapport">snapport</a><span>, in §4.2</span>
   <li><a href="#scroll-snap-position">snap position</a><span>, in §3</span>
   <li><a href="#valdef-scroll-snap-align-start">start</a><span>, in §5.2</span>
   <li><a href="#strictness-value">strictness value</a><span>, in §4.1.2</span>
   <li><a href="#valdef-scroll-snap-type-x">x</a><span>, in §4.1.1</span>
   <li><a href="#valdef-scroll-snap-type-y">y</a><span>, in §4.1.1</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-alignment-container">
   <a href="https://www.w3.org/TR/css3-align/#alignment-container">https://www.w3.org/TR/css3-align/#alignment-container</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-alignment-container">3. Scroll Snap Model</a>
    <li><a href="#ref-for-alignment-container①">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-alignment-container②">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-alignment-subject">
   <a href="https://www.w3.org/TR/css3-align/#alignment-subject">https://www.w3.org/TR/css3-align/#alignment-subject</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-alignment-subject">3. Scroll Snap Model</a>
    <li><a href="#ref-for-alignment-subject①">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-margin">
   <a href="https://www.w3.org/TR/css-box-3/#propdef-margin">https://www.w3.org/TR/css-box-3/#propdef-margin</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-margin">5.1. Scroll Snapping Area: the scroll-margin property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-padding">
   <a href="https://www.w3.org/TR/css-box-3/#propdef-padding">https://www.w3.org/TR/css-box-3/#propdef-padding</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-padding">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-propdef-padding①">9.4. Changes Since 20 October 2016 CR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-longhand">
   <a href="https://www.w3.org/TR/css-cascade-4/#longhand">https://www.w3.org/TR/css-cascade-4/#longhand</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-longhand">Physical Longhands for scroll-padding</a>
    <li><a href="#ref-for-longhand①">Flow-relative Longhands for scroll-padding</a> <a href="#ref-for-longhand②">(2)</a>
    <li><a href="#ref-for-longhand③">Physical Longhands for scroll-margin</a>
    <li><a href="#ref-for-longhand④">Flow-relative Longhands for scroll-margin</a> <a href="#ref-for-longhand⑤">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-shorthand-property">
   <a href="https://www.w3.org/TR/css-cascade-4/#shorthand-property">https://www.w3.org/TR/css-cascade-4/#shorthand-property</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-shorthand-property">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-shorthand-property①">5.1. Scroll Snapping Area: the scroll-margin property</a>
    <li><a href="#ref-for-shorthand-property②">Flow-relative Longhands for scroll-padding</a>
    <li><a href="#ref-for-shorthand-property③">Flow-relative Longhands for scroll-margin</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-shorthand-property">
   <a href="https://www.w3.org/TR/css-cascade-4/#shorthand-property">https://www.w3.org/TR/css-cascade-4/#shorthand-property</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-shorthand-property">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-shorthand-property①">5.1. Scroll Snapping Area: the scroll-margin property</a>
    <li><a href="#ref-for-shorthand-property②">Flow-relative Longhands for scroll-padding</a>
    <li><a href="#ref-for-shorthand-property③">Flow-relative Longhands for scroll-margin</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-containing-block-chain">
   <a href="https://www.w3.org/TR/css-display-3/#containing-block-chain">https://www.w3.org/TR/css-display-3/#containing-block-chain</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-containing-block-chain">3. Scroll Snap Model</a>
    <li><a href="#ref-for-containing-block-chain①">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-overflow">
   <a href="https://www.w3.org/TR/css-overflow-3/#propdef-overflow">https://www.w3.org/TR/css-overflow-3/#propdef-overflow</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-overflow">4.1. Scroll Snapping Rules: the scroll-snap-type property</a>
    <li><a href="#ref-for-propdef-overflow①">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-propdef-overflow②">9.1. Changes Since 31 January 2019 CR</a> <a href="#ref-for-propdef-overflow③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-scroll-container">
   <a href="https://www.w3.org/TR/css-overflow-3/#scroll-container">https://www.w3.org/TR/css-overflow-3/#scroll-container</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-scroll-container">1. Introduction</a> <a href="#ref-for-scroll-container①">(2)</a> <a href="#ref-for-scroll-container②">(3)</a>
    <li><a href="#ref-for-scroll-container③">2. Motivating Examples</a> <a href="#ref-for-scroll-container④">(2)</a> <a href="#ref-for-scroll-container⑤">(3)</a> <a href="#ref-for-scroll-container⑥">(4)</a>
    <li><a href="#ref-for-scroll-container⑦">3. Scroll Snap Model</a> <a href="#ref-for-scroll-container⑧">(2)</a> <a href="#ref-for-scroll-container⑨">(3)</a> <a href="#ref-for-scroll-container①⓪">(4)</a>
    <li><a href="#ref-for-scroll-container①①">4.1. Scroll Snapping Rules: the scroll-snap-type property</a>
    <li><a href="#ref-for-scroll-container①②">4.1.1. 
Scroll Snap Axis: the x, y, block, inline, and both values</a> <a href="#ref-for-scroll-container①③">(2)</a> <a href="#ref-for-scroll-container①④">(3)</a> <a href="#ref-for-scroll-container①⑤">(4)</a> <a href="#ref-for-scroll-container①⑥">(5)</a>
    <li><a href="#ref-for-scroll-container①⑦">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a> <a href="#ref-for-scroll-container①⑧">(2)</a> <a href="#ref-for-scroll-container①⑨">(3)</a> <a href="#ref-for-scroll-container②⓪">(4)</a> <a href="#ref-for-scroll-container②①">(5)</a> <a href="#ref-for-scroll-container②②">(6)</a> <a href="#ref-for-scroll-container②③">(7)</a> <a href="#ref-for-scroll-container②④">(8)</a> <a href="#ref-for-scroll-container②⑤">(9)</a>
    <li><a href="#ref-for-scroll-container②⑥">4.1.3. 
Re-snapping After Layout Changes</a>
    <li><a href="#ref-for-scroll-container②⑦">4.2. Scroll Snapport: the scroll-padding property</a> <a href="#ref-for-scroll-container②⑧">(2)</a>
    <li><a href="#ref-for-scroll-container②⑨">5.1. Scroll Snapping Area: the scroll-margin property</a> <a href="#ref-for-scroll-container③⓪">(2)</a>
    <li><a href="#ref-for-scroll-container③①">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a> <a href="#ref-for-scroll-container③②">(2)</a> <a href="#ref-for-scroll-container③③">(3)</a>
    <li><a href="#ref-for-scroll-container③④">5.2.1. 
Scoping Valid Snap Positions to Visible Boxes</a>
    <li><a href="#ref-for-scroll-container③⑤">5.2.3. 
Unreachable Snap Positions</a>
    <li><a href="#ref-for-scroll-container③⑥">5.3. Scroll Snap Limits: the scroll-snap-stop property</a> <a href="#ref-for-scroll-container③⑦">(2)</a> <a href="#ref-for-scroll-container③⑧">(3)</a> <a href="#ref-for-scroll-container③⑨">(4)</a>
    <li><a href="#ref-for-scroll-container④⓪">6.2. Choosing Snap Positions</a> <a href="#ref-for-scroll-container④①">(2)</a> <a href="#ref-for-scroll-container④②">(3)</a>
    <li><a href="#ref-for-scroll-container④③">Physical Longhands for scroll-padding</a>
    <li><a href="#ref-for-scroll-container④④">Flow-relative Longhands for scroll-padding</a>
    <li><a href="#ref-for-scroll-container④⑤">9.1. Changes Since 31 January 2019 CR</a> <a href="#ref-for-scroll-container④⑥">(2)</a> <a href="#ref-for-scroll-container④⑦">(3)</a>
    <li><a href="#ref-for-scroll-container④⑧">9.2. Changes Since 14 December 2017 CR</a>
    <li><a href="#ref-for-scroll-container④⑨">9.3. Changes Since 24 August 2017 CR</a> <a href="#ref-for-scroll-container⑤⓪">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-scrollable-overflow-region">
   <a href="https://www.w3.org/TR/css-overflow-3/#scrollable-overflow-region">https://www.w3.org/TR/css-overflow-3/#scrollable-overflow-region</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-scrollable-overflow-region">5.1. Scroll Snapping Area: the scroll-margin property</a>
    <li><a href="#ref-for-scrollable-overflow-region①">5.2.3. 
Unreachable Snap Positions</a>
    <li><a href="#ref-for-scrollable-overflow-region②">6.2. Choosing Snap Positions</a> <a href="#ref-for-scrollable-overflow-region③">(2)</a>
    <li><a href="#ref-for-scrollable-overflow-region④">9.1. Changes Since 31 January 2019 CR</a>
    <li><a href="#ref-for-scrollable-overflow-region⑤">9.3. Changes Since 24 August 2017 CR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-scrollport">
   <a href="https://www.w3.org/TR/css-overflow-3/#scrollport">https://www.w3.org/TR/css-overflow-3/#scrollport</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-scrollport">4.2. Scroll Snapport: the scroll-padding property</a> <a href="#ref-for-scrollport①">(2)</a> <a href="#ref-for-scrollport②">(3)</a> <a href="#ref-for-scrollport③">(4)</a> <a href="#ref-for-scrollport④">(5)</a>
    <li><a href="#ref-for-scrollport⑤">5.2.1. 
Scoping Valid Snap Positions to Visible Boxes</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-selectordef-after">
   <a href="https://www.w3.org/TR/css-pseudo-4/#selectordef-after">https://www.w3.org/TR/css-pseudo-4/#selectordef-after</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-selectordef-after">4.1.3. 
Re-snapping After Layout Changes</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-selectordef-first-letter">
   <a href="https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter">https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-selectordef-first-letter">1.1. Module interactions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-selectordef-first-line">
   <a href="https://www.w3.org/TR/css-pseudo-4/#selectordef-first-line">https://www.w3.org/TR/css-pseudo-4/#selectordef-first-line</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-selectordef-first-line">1.1. Module interactions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-length-value">
   <a href="https://www.w3.org/TR/css3-values/#length-value">https://www.w3.org/TR/css3-values/#length-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-length-value">5.1. Scroll Snapping Area: the scroll-margin property</a>
    <li><a href="#ref-for-length-value①">Physical Longhands for scroll-margin</a>
    <li><a href="#ref-for-length-value②">Flow-relative Longhands for scroll-margin</a> <a href="#ref-for-length-value③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-percentage-value">
   <a href="https://www.w3.org/TR/css3-values/#percentage-value">https://www.w3.org/TR/css3-values/#percentage-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-percentage-value">9.1. Changes Since 31 January 2019 CR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-length-percentage">
   <a href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage">https://www.w3.org/TR/css-values-4/#typedef-length-percentage</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-length-percentage">4.2. Scroll Snapport: the scroll-padding property</a> <a href="#ref-for-typedef-length-percentage①">(2)</a> <a href="#ref-for-typedef-length-percentage②">(3)</a>
    <li><a href="#ref-for-typedef-length-percentage③">Physical Longhands for scroll-padding</a> <a href="#ref-for-typedef-length-percentage④">(2)</a>
    <li><a href="#ref-for-typedef-length-percentage⑤">Flow-relative Longhands for scroll-padding</a> <a href="#ref-for-typedef-length-percentage⑥">(2)</a> <a href="#ref-for-typedef-length-percentage⑦">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-mult-opt">
   <a href="https://www.w3.org/TR/css-values-4/#mult-opt">https://www.w3.org/TR/css-values-4/#mult-opt</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-opt">4.1. Scroll Snapping Rules: the scroll-snap-type property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-css-wide-keywords">
   <a href="https://www.w3.org/TR/css-values-4/#css-wide-keywords">https://www.w3.org/TR/css-values-4/#css-wide-keywords</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-css-wide-keywords">1.2. Values</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-mult-num-range">
   <a href="https://www.w3.org/TR/css-values-4/#mult-num-range">https://www.w3.org/TR/css-values-4/#mult-num-range</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-num-range">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-mult-num-range①">5.1. Scroll Snapping Area: the scroll-margin property</a>
    <li><a href="#ref-for-mult-num-range②">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a>
    <li><a href="#ref-for-mult-num-range③">Flow-relative Longhands for scroll-padding</a>
    <li><a href="#ref-for-mult-num-range④">Flow-relative Longhands for scroll-margin</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-one">
   <a href="https://www.w3.org/TR/css-values-4/#comb-one">https://www.w3.org/TR/css-values-4/#comb-one</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-one">4.1. Scroll Snapping Rules: the scroll-snap-type property</a> <a href="#ref-for-comb-one①">(2)</a> <a href="#ref-for-comb-one②">(3)</a> <a href="#ref-for-comb-one③">(4)</a> <a href="#ref-for-comb-one④">(5)</a> <a href="#ref-for-comb-one⑤">(6)</a>
    <li><a href="#ref-for-comb-one⑥">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-comb-one⑦">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a> <a href="#ref-for-comb-one⑧">(2)</a> <a href="#ref-for-comb-one⑨">(3)</a>
    <li><a href="#ref-for-comb-one①⓪">5.3. Scroll Snap Limits: the scroll-snap-stop property</a>
    <li><a href="#ref-for-comb-one①①">Physical Longhands for scroll-padding</a>
    <li><a href="#ref-for-comb-one①②">Flow-relative Longhands for scroll-padding</a> <a href="#ref-for-comb-one①③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-block-axis">
   <a href="https://www.w3.org/TR/css-writing-modes-4/#block-axis">https://www.w3.org/TR/css-writing-modes-4/#block-axis</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-block-axis">4.1. Scroll Snapping Rules: the scroll-snap-type property</a>
    <li><a href="#ref-for-block-axis①">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-inline-axis">
   <a href="https://www.w3.org/TR/css-writing-modes-4/#inline-axis">https://www.w3.org/TR/css-writing-modes-4/#inline-axis</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-inline-axis">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-window-scrollby">
   <a href="https://www.w3.org/TR/cssom-view/#dom-window-scrollby">https://www.w3.org/TR/cssom-view/#dom-window-scrollby</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-window-scrollby">6.1. Types of Scrolling Methods</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-element-scrollintoview">
   <a href="https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview">https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-element-scrollintoview">5.1. Scroll Snapping Area: the scroll-margin property</a>
    <li><a href="#ref-for-dom-element-scrollintoview①">6.2. Choosing Snap Positions</a>
    <li><a href="#ref-for-dom-element-scrollintoview②">9.1. Changes Since 31 January 2019 CR</a>
    <li><a href="#ref-for-dom-element-scrollintoview③">9.3. Changes Since 24 August 2017 CR</a> <a href="#ref-for-dom-element-scrollintoview④">(2)</a> <a href="#ref-for-dom-element-scrollintoview⑤">(3)</a> <a href="#ref-for-dom-element-scrollintoview⑥">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-window-scrollto">
   <a href="https://www.w3.org/TR/cssom-view/#dom-window-scrollto">https://www.w3.org/TR/cssom-view/#dom-window-scrollto</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-window-scrollto">3. Scroll Snap Model</a>
    <li><a href="#ref-for-dom-window-scrollto①">6.1. Types of Scrolling Methods</a>
    <li><a href="#ref-for-dom-window-scrollto②">9.2. Changes Since 14 December 2017 CR</a> <a href="#ref-for-dom-window-scrollto③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-the-body-element">
   <a href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element">https://html.spec.whatwg.org/multipage/sections.html#the-body-element</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-the-body-element">4.1. Scroll Snapping Rules: the scroll-snap-type property</a>
    <li><a href="#ref-for-the-body-element①">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-the-body-element②">9.1. Changes Since 31 January 2019 CR</a> <a href="#ref-for-the-body-element③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-the-section-element">
   <a href="https://html.spec.whatwg.org/multipage/sections.html#the-section-element">https://html.spec.whatwg.org/multipage/sections.html#the-section-element</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-the-section-element">5.2.2. 
Snapping Boxes that Overflow the Scrollport</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-target-pseudo">
   <a href="https://www.w3.org/TR/selectors4/#target-pseudo">https://www.w3.org/TR/selectors4/#target-pseudo</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-target-pseudo">5.1. Scroll Snapping Area: the scroll-margin property</a>
    <li><a href="#ref-for-target-pseudo①">6.2. Choosing Snap Positions</a>
    <li><a href="#ref-for-target-pseudo②">9.1. Changes Since 31 January 2019 CR</a>
    <li><a href="#ref-for-target-pseudo③">9.3. Changes Since 24 August 2017 CR</a> <a href="#ref-for-target-pseudo④">(2)</a> <a href="#ref-for-target-pseudo⑤">(3)</a> <a href="#ref-for-target-pseudo⑥">(4)</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[css-align-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-alignment-container" style="color:initial">alignment container</span>
     <li><span class="dfn-paneled" id="term-for-alignment-subject" style="color:initial">alignment subject</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-box-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-margin" style="color:initial">margin</span>
     <li><span class="dfn-paneled" id="term-for-propdef-padding" style="color:initial">padding</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-cascade-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-longhand" style="color:initial">longhand</span>
     <li><span class="dfn-paneled" id="term-for-shorthand-property" style="color:initial">shorthand</span>
     <li><span class="dfn-paneled" id="term-for-shorthand-property①" style="color:initial">shorthand property</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-display-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-containing-block-chain" style="color:initial">containing block chain</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-overflow-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-overflow" style="color:initial">overflow</span>
     <li><span class="dfn-paneled" id="term-for-scroll-container" style="color:initial">scroll container</span>
     <li><span class="dfn-paneled" id="term-for-scrollable-overflow-region" style="color:initial">scrollable overflow region</span>
     <li><span class="dfn-paneled" id="term-for-scrollport" style="color:initial">scrollport</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-pseudo-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-selectordef-after" style="color:initial">::after</span>
     <li><span class="dfn-paneled" id="term-for-selectordef-first-letter" style="color:initial">::first-letter</span>
     <li><span class="dfn-paneled" id="term-for-selectordef-first-line" style="color:initial">::first-line</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS-VALUES-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-length-value" style="color:initial">&lt;length></span>
     <li><span class="dfn-paneled" id="term-for-percentage-value" style="color:initial">&lt;percentage></span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-values-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-typedef-length-percentage" style="color:initial">&lt;length-percentage></span>
     <li><span class="dfn-paneled" id="term-for-mult-opt" style="color:initial">?</span>
     <li><span class="dfn-paneled" id="term-for-css-wide-keywords" style="color:initial">css-wide keywords</span>
     <li><span class="dfn-paneled" id="term-for-mult-num-range" style="color:initial">{a,b}</span>
     <li><span class="dfn-paneled" id="term-for-comb-one" style="color:initial">|</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-writing-modes-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-block-axis" style="color:initial">block axis</span>
     <li><span class="dfn-paneled" id="term-for-inline-axis" style="color:initial">inline axis</span>
    </ul>
   <li>
    <a data-link-type="biblio">[cssom-view-1]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-dom-window-scrollby" style="color:initial">scrollBy()</span>
     <li><span class="dfn-paneled" id="term-for-dom-element-scrollintoview" style="color:initial">scrollIntoView()</span>
     <li><span class="dfn-paneled" id="term-for-dom-window-scrollto" style="color:initial">scrollTo()</span>
    </ul>
   <li>
    <a data-link-type="biblio">[HTML]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-the-body-element" style="color:initial">body</span>
     <li><span class="dfn-paneled" id="term-for-the-section-element" style="color:initial">section</span>
    </ul>
   <li>
    <a data-link-type="biblio">[selectors-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-target-pseudo" style="color:initial">:target</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-css-align-3">[CSS-ALIGN-3]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-align-3/">CSS Box Alignment Module Level 3</a>. 6 December 2018. WD. URL: <a href="https://www.w3.org/TR/css-align-3/">https://www.w3.org/TR/css-align-3/</a>
   <dt id="biblio-css-box-3">[CSS-BOX-3]
   <dd>Elika Etemad. <a href="https://www.w3.org/TR/css-box-3/">CSS Box Model Module Level 3</a>. 18 December 2018. WD. URL: <a href="https://www.w3.org/TR/css-box-3/">https://www.w3.org/TR/css-box-3/</a>
   <dt id="biblio-css-cascade-4">[CSS-CASCADE-4]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-4/">CSS Cascading and Inheritance Level 4</a>. 28 August 2018. CR. URL: <a href="https://www.w3.org/TR/css-cascade-4/">https://www.w3.org/TR/css-cascade-4/</a>
   <dt id="biblio-css-display-3">[CSS-DISPLAY-3]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-display-3/">CSS Display Module Level 3</a>. 28 August 2018. CR. URL: <a href="https://www.w3.org/TR/css-display-3/">https://www.w3.org/TR/css-display-3/</a>
   <dt id="biblio-css-logical-1">[CSS-LOGICAL-1]
   <dd>Rossen Atanassov; Elika Etemad. <a href="https://www.w3.org/TR/css-logical-1/">CSS Logical Properties and Values Level 1</a>. 27 August 2018. WD. URL: <a href="https://www.w3.org/TR/css-logical-1/">https://www.w3.org/TR/css-logical-1/</a>
   <dt id="biblio-css-overflow-3">[CSS-OVERFLOW-3]
   <dd>David Baron; Elika Etemad; Florian Rivoal. <a href="https://www.w3.org/TR/css-overflow-3/">CSS Overflow Module Level 3</a>. 31 July 2018. WD. URL: <a href="https://www.w3.org/TR/css-overflow-3/">https://www.w3.org/TR/css-overflow-3/</a>
   <dt id="biblio-css-pseudo-4">[CSS-PSEUDO-4]
   <dd>Daniel Glazman; Elika Etemad; Alan Stearns. <a href="https://www.w3.org/TR/css-pseudo-4/">CSS Pseudo-Elements Module Level 4</a>. 25 February 2019. WD. URL: <a href="https://www.w3.org/TR/css-pseudo-4/">https://www.w3.org/TR/css-pseudo-4/</a>
   <dt id="biblio-css-values-3">[CSS-VALUES-3]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-3/">CSS Values and Units Module Level 3</a>. 31 January 2019. CR. URL: <a href="https://www.w3.org/TR/css-values-3/">https://www.w3.org/TR/css-values-3/</a>
   <dt id="biblio-css-values-4">[CSS-VALUES-4]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/">CSS Values and Units Module Level 4</a>. 31 January 2019. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a>
   <dt id="biblio-css-writing-modes-4">[CSS-WRITING-MODES-4]
   <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-4/">CSS Writing Modes Level 4</a>. 24 May 2018. CR. URL: <a href="https://www.w3.org/TR/css-writing-modes-4/">https://www.w3.org/TR/css-writing-modes-4/</a>
   <dt id="biblio-css2">[CSS2]
   <dd>Bert Bos; et al. <a href="https://www.w3.org/TR/CSS2/">Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. REC. URL: <a href="https://www.w3.org/TR/CSS2/">https://www.w3.org/TR/CSS2/</a>
   <dt id="biblio-cssom-view-1">[CSSOM-VIEW-1]
   <dd>Simon Pieters. <a href="https://www.w3.org/TR/cssom-view-1/">CSSOM View Module</a>. 17 March 2016. WD. URL: <a href="https://www.w3.org/TR/cssom-view-1/">https://www.w3.org/TR/cssom-view-1/</a>
   <dt id="biblio-html">[HTML]
   <dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/">HTML Standard</a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a>
   <dt id="biblio-rfc2119">[RFC2119]
   <dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
   <dt id="biblio-selectors-4">[SELECTORS-4]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/selectors-4/">Selectors Level 4</a>. 21 November 2018. WD. URL: <a href="https://www.w3.org/TR/selectors-4/">https://www.w3.org/TR/selectors-4/</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2>
  <div class="big-element-wrapper">
   <table class="index">
    <thead>
     <tr>
      <th scope="col">Name
      <th scope="col">Value
      <th scope="col">Initial
      <th scope="col">Applies to
      <th scope="col">Inh.
      <th scope="col">%ages
      <th scope="col">Anim­ation type
      <th scope="col">Canonical order
      <th scope="col">Com­puted value
    <tbody>
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin" id="ref-for-propdef-scroll-margin①④">scroll-margin</a>
      <td>&lt;length>{1,4}
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>per side, an absolute length
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-block" id="ref-for-propdef-scroll-margin-block">scroll-margin-block</a>
      <td>&lt;length>{1,2}
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>see individual properties
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-block-end" id="ref-for-propdef-scroll-margin-block-end①">scroll-margin-block-end</a>
      <td>&lt;length>
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>absolute length
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-block-start" id="ref-for-propdef-scroll-margin-block-start①">scroll-margin-block-start</a>
      <td>&lt;length>
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>absolute length
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-bottom" id="ref-for-propdef-scroll-margin-bottom">scroll-margin-bottom</a>
      <td>&lt;length>
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>absolute length
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-inline" id="ref-for-propdef-scroll-margin-inline">scroll-margin-inline</a>
      <td>&lt;length>{1,2}
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>see individual properties
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-inline-end" id="ref-for-propdef-scroll-margin-inline-end①">scroll-margin-inline-end</a>
      <td>&lt;length>
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>absolute length
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-inline-start" id="ref-for-propdef-scroll-margin-inline-start①">scroll-margin-inline-start</a>
      <td>&lt;length>
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>absolute length
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-left" id="ref-for-propdef-scroll-margin-left">scroll-margin-left</a>
      <td>&lt;length>
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>absolute length
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-right" id="ref-for-propdef-scroll-margin-right">scroll-margin-right</a>
      <td>&lt;length>
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>absolute length
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-margin-top" id="ref-for-propdef-scroll-margin-top">scroll-margin-top</a>
      <td>&lt;length>
      <td>0
      <td>all elements
      <td>no
      <td>n/a
      <td>by computed value type
      <td>per grammar
      <td>absolute length
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding" id="ref-for-propdef-scroll-padding②⓪">scroll-padding</a>
      <td>[ auto | &lt;length-percentage> ]{1,4}
      <td>auto
      <td>scroll containers
      <td>no
      <td>relative to the corresponding dimension of the scroll container’s scrollport
      <td>by computed value type
      <td>per grammar
      <td>per side, either the keyword auto or a computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-block" id="ref-for-propdef-scroll-padding-block">scroll-padding-block</a>
      <td>[ auto | &lt;length-percentage> ]{1,2}
      <td>auto
      <td>all elements
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value
      <td>per grammar
      <td>see individual properties
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-block-end" id="ref-for-propdef-scroll-padding-block-end①">scroll-padding-block-end</a>
      <td>auto | &lt;length-percentage>
      <td>auto
      <td>scroll containers
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value type
      <td>per grammar
      <td>the keyword auto or a computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-block-start" id="ref-for-propdef-scroll-padding-block-start①">scroll-padding-block-start</a>
      <td>auto | &lt;length-percentage>
      <td>auto
      <td>scroll containers
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value type
      <td>per grammar
      <td>the keyword auto or a computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-bottom" id="ref-for-propdef-scroll-padding-bottom">scroll-padding-bottom</a>
      <td>auto | &lt;length-percentage>
      <td>auto
      <td>scroll containers
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value type
      <td>per grammar
      <td>the keyword auto or a computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-inline" id="ref-for-propdef-scroll-padding-inline">scroll-padding-inline</a>
      <td>[ auto | &lt;length-percentage> ]{1,2}
      <td>auto
      <td>all elements
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value
      <td>per grammar
      <td>see individual properties
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-inline-end" id="ref-for-propdef-scroll-padding-inline-end①">scroll-padding-inline-end</a>
      <td>auto | &lt;length-percentage>
      <td>auto
      <td>scroll containers
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value type
      <td>per grammar
      <td>the keyword auto or a computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-inline-start" id="ref-for-propdef-scroll-padding-inline-start①">scroll-padding-inline-start</a>
      <td>auto | &lt;length-percentage>
      <td>auto
      <td>scroll containers
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value type
      <td>per grammar
      <td>the keyword auto or a computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-left" id="ref-for-propdef-scroll-padding-left">scroll-padding-left</a>
      <td>auto | &lt;length-percentage>
      <td>auto
      <td>scroll containers
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value type
      <td>per grammar
      <td>the keyword auto or a computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-right" id="ref-for-propdef-scroll-padding-right">scroll-padding-right</a>
      <td>auto | &lt;length-percentage>
      <td>auto
      <td>scroll containers
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value type
      <td>per grammar
      <td>the keyword auto or a computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-padding-top" id="ref-for-propdef-scroll-padding-top">scroll-padding-top</a>
      <td>auto | &lt;length-percentage>
      <td>auto
      <td>scroll containers
      <td>no
      <td>relative to the scroll container’s scrollport
      <td>by computed value type
      <td>per grammar
      <td>the keyword auto or a computed &lt;length-percentage> value
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-snap-align" id="ref-for-propdef-scroll-snap-align④">scroll-snap-align</a>
      <td>[ none | start | end | center ]{1,2}
      <td>none
      <td>all elements
      <td>no
      <td>n/a
      <td>discrete
      <td>per grammar
      <td>two keywords
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-snap-stop" id="ref-for-propdef-scroll-snap-stop⑤">scroll-snap-stop</a>
      <td>normal | always
      <td>normal
      <td>all elements
      <td>no
      <td>n/a
      <td>discrete
      <td>per grammar
      <td>specified keyword
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-snap-type" id="ref-for-propdef-scroll-snap-type①⑦">scroll-snap-type</a>
      <td>none | [ x | y | block | inline | both ] [ mandatory | proximity ]?
      <td>none
      <td>all elements
      <td>no
      <td>n/a
      <td>discrete
      <td>per grammar
      <td>specified keyword(s)
   </table>
  </div>
  <aside class="dfn-panel" data-for="scroll-snap-position">
   <b><a href="#scroll-snap-position">#scroll-snap-position</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-scroll-snap-position">1. Introduction</a>
    <li><a href="#ref-for-scroll-snap-position①">3. Scroll Snap Model</a> <a href="#ref-for-scroll-snap-position②">(2)</a> <a href="#ref-for-scroll-snap-position③">(3)</a> <a href="#ref-for-scroll-snap-position④">(4)</a> <a href="#ref-for-scroll-snap-position⑤">(5)</a> <a href="#ref-for-scroll-snap-position⑥">(6)</a> <a href="#ref-for-scroll-snap-position⑦">(7)</a>
    <li><a href="#ref-for-scroll-snap-position⑧">4.1.1. 
Scroll Snap Axis: the x, y, block, inline, and both values</a> <a href="#ref-for-scroll-snap-position⑨">(2)</a> <a href="#ref-for-scroll-snap-position①⓪">(3)</a> <a href="#ref-for-scroll-snap-position①①">(4)</a> <a href="#ref-for-scroll-snap-position①②">(5)</a> <a href="#ref-for-scroll-snap-position①③">(6)</a> <a href="#ref-for-scroll-snap-position①④">(7)</a>
    <li><a href="#ref-for-scroll-snap-position①⑤">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a> <a href="#ref-for-scroll-snap-position①⑥">(2)</a> <a href="#ref-for-scroll-snap-position①⑦">(3)</a>
    <li><a href="#ref-for-scroll-snap-position①⑧">4.1.3. 
Re-snapping After Layout Changes</a>
    <li><a href="#ref-for-scroll-snap-position①⑨">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-scroll-snap-position②⓪">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a> <a href="#ref-for-scroll-snap-position②①">(2)</a> <a href="#ref-for-scroll-snap-position②②">(3)</a> <a href="#ref-for-scroll-snap-position②③">(4)</a> <a href="#ref-for-scroll-snap-position②④">(5)</a>
    <li><a href="#ref-for-scroll-snap-position②⑤">5.2.1. 
Scoping Valid Snap Positions to Visible Boxes</a> <a href="#ref-for-scroll-snap-position②⑥">(2)</a> <a href="#ref-for-scroll-snap-position②⑦">(3)</a> <a href="#ref-for-scroll-snap-position②⑧">(4)</a> <a href="#ref-for-scroll-snap-position②⑨">(5)</a> <a href="#ref-for-scroll-snap-position③⓪">(6)</a>
    <li><a href="#ref-for-scroll-snap-position③①">5.2.2. 
Snapping Boxes that Overflow the Scrollport</a> <a href="#ref-for-scroll-snap-position③②">(2)</a> <a href="#ref-for-scroll-snap-position③③">(3)</a>
    <li><a href="#ref-for-scroll-snap-position③④">5.2.3. 
Unreachable Snap Positions</a> <a href="#ref-for-scroll-snap-position③⑤">(2)</a> <a href="#ref-for-scroll-snap-position③⑥">(3)</a>
    <li><a href="#ref-for-scroll-snap-position③⑦">5.3. Scroll Snap Limits: the scroll-snap-stop property</a> <a href="#ref-for-scroll-snap-position③⑧">(2)</a> <a href="#ref-for-scroll-snap-position③⑨">(3)</a> <a href="#ref-for-scroll-snap-position④⓪">(4)</a> <a href="#ref-for-scroll-snap-position④①">(5)</a> <a href="#ref-for-scroll-snap-position④②">(6)</a>
    <li><a href="#ref-for-scroll-snap-position④③">6. Snapping Mechanics</a>
    <li><a href="#ref-for-scroll-snap-position④④">6.2. Choosing Snap Positions</a> <a href="#ref-for-scroll-snap-position④⑤">(2)</a> <a href="#ref-for-scroll-snap-position④⑥">(3)</a> <a href="#ref-for-scroll-snap-position④⑦">(4)</a> <a href="#ref-for-scroll-snap-position④⑧">(5)</a> <a href="#ref-for-scroll-snap-position④⑨">(6)</a> <a href="#ref-for-scroll-snap-position⑤⓪">(7)</a> <a href="#ref-for-scroll-snap-position⑤①">(8)</a> <a href="#ref-for-scroll-snap-position⑤②">(9)</a> <a href="#ref-for-scroll-snap-position⑤③">(10)</a> <a href="#ref-for-scroll-snap-position⑤④">(11)</a>
    <li><a href="#ref-for-scroll-snap-position⑤⑤">9.2. Changes Since 14 December 2017 CR</a>
    <li><a href="#ref-for-scroll-snap-position⑤⑥">9.3. Changes Since 24 August 2017 CR</a> <a href="#ref-for-scroll-snap-position⑤⑦">(2)</a>
    <li><a href="#ref-for-scroll-snap-position⑤⑧">9.4. Changes Since 20 October 2016 CR</a> <a href="#ref-for-scroll-snap-position⑤⑨">(2)</a> <a href="#ref-for-scroll-snap-position⑥⓪">(3)</a> <a href="#ref-for-scroll-snap-position⑥①">(4)</a> <a href="#ref-for-scroll-snap-position⑥②">(5)</a> <a href="#ref-for-scroll-snap-position⑥③">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="snap">
   <b><a href="#snap">#snap</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-snap">3. Scroll Snap Model</a>
    <li><a href="#ref-for-snap①">4.1. Scroll Snapping Rules: the scroll-snap-type property</a>
    <li><a href="#ref-for-snap②">4.1.1. 
Scroll Snap Axis: the x, y, block, inline, and both values</a> <a href="#ref-for-snap③">(2)</a> <a href="#ref-for-snap④">(3)</a> <a href="#ref-for-snap⑤">(4)</a> <a href="#ref-for-snap⑥">(5)</a>
    <li><a href="#ref-for-snap⑦">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a> <a href="#ref-for-snap⑧">(2)</a> <a href="#ref-for-snap⑨">(3)</a> <a href="#ref-for-snap①⓪">(4)</a> <a href="#ref-for-snap①①">(5)</a> <a href="#ref-for-snap①②">(6)</a>
    <li><a href="#ref-for-snap①③">4.1.3. 
Re-snapping After Layout Changes</a>
    <li><a href="#ref-for-snap①④">5.2.1. 
Scoping Valid Snap Positions to Visible Boxes</a> <a href="#ref-for-snap①⑤">(2)</a> <a href="#ref-for-snap①⑥">(3)</a>
    <li><a href="#ref-for-snap①⑦">6.2. Choosing Snap Positions</a>
    <li><a href="#ref-for-snap①⑧">9.3. Changes Since 24 August 2017 CR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-snap-type">
   <b><a href="#propdef-scroll-snap-type">#propdef-scroll-snap-type</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-snap-type">3. Scroll Snap Model</a>
    <li><a href="#ref-for-propdef-scroll-snap-type①">4.1. Scroll Snapping Rules: the scroll-snap-type property</a> <a href="#ref-for-propdef-scroll-snap-type②">(2)</a> <a href="#ref-for-propdef-scroll-snap-type③">(3)</a> <a href="#ref-for-propdef-scroll-snap-type④">(4)</a>
    <li><a href="#ref-for-propdef-scroll-snap-type⑤">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a> <a href="#ref-for-propdef-scroll-snap-type⑥">(2)</a>
    <li><a href="#ref-for-propdef-scroll-snap-type⑦">5.2.1. 
Scoping Valid Snap Positions to Visible Boxes</a>
    <li><a href="#ref-for-propdef-scroll-snap-type⑧">6.2. Choosing Snap Positions</a>
    <li><a href="#ref-for-propdef-scroll-snap-type⑨">9.1. Changes Since 31 January 2019 CR</a> <a href="#ref-for-propdef-scroll-snap-type①⓪">(2)</a> <a href="#ref-for-propdef-scroll-snap-type①①">(3)</a>
    <li><a href="#ref-for-propdef-scroll-snap-type①②">9.2. Changes Since 14 December 2017 CR</a> <a href="#ref-for-propdef-scroll-snap-type①③">(2)</a>
    <li><a href="#ref-for-propdef-scroll-snap-type①④">9.3. Changes Since 24 August 2017 CR</a>
    <li><a href="#ref-for-propdef-scroll-snap-type①⑤">9.4. Changes Since 20 October 2016 CR</a> <a href="#ref-for-propdef-scroll-snap-type①⑥">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-scroll-snap-type-x">
   <b><a href="#valdef-scroll-snap-type-x">#valdef-scroll-snap-type-x</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-scroll-snap-type-x">4.1.1. 
Scroll Snap Axis: the x, y, block, inline, and both values</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-scroll-snap-type-y">
   <b><a href="#valdef-scroll-snap-type-y">#valdef-scroll-snap-type-y</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-scroll-snap-type-y">4.1.1. 
Scroll Snap Axis: the x, y, block, inline, and both values</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-scroll-snap-type-block">
   <b><a href="#valdef-scroll-snap-type-block">#valdef-scroll-snap-type-block</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-scroll-snap-type-block">4.1.1. 
Scroll Snap Axis: the x, y, block, inline, and both values</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-scroll-snap-type-inline">
   <b><a href="#valdef-scroll-snap-type-inline">#valdef-scroll-snap-type-inline</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-scroll-snap-type-inline">4.1.1. 
Scroll Snap Axis: the x, y, block, inline, and both values</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-scroll-snap-type-both">
   <b><a href="#valdef-scroll-snap-type-both">#valdef-scroll-snap-type-both</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-scroll-snap-type-both">4.1.1. 
Scroll Snap Axis: the x, y, block, inline, and both values</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-scroll-snap-type-none">
   <b><a href="#valdef-scroll-snap-type-none">#valdef-scroll-snap-type-none</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-scroll-snap-type-none">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a> <a href="#ref-for-valdef-scroll-snap-type-none①">(2)</a> <a href="#ref-for-valdef-scroll-snap-type-none②">(3)</a> <a href="#ref-for-valdef-scroll-snap-type-none③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-scroll-snap-type-mandatory">
   <b><a href="#valdef-scroll-snap-type-mandatory">#valdef-scroll-snap-type-mandatory</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-scroll-snap-type-mandatory">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a> <a href="#ref-for-valdef-scroll-snap-type-mandatory①">(2)</a>
    <li><a href="#ref-for-valdef-scroll-snap-type-mandatory②">6.2. Choosing Snap Positions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-scroll-snap-type-proximity">
   <b><a href="#valdef-scroll-snap-type-proximity">#valdef-scroll-snap-type-proximity</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-scroll-snap-type-proximity">4.1. Scroll Snapping Rules: the scroll-snap-type property</a>
    <li><a href="#ref-for-valdef-scroll-snap-type-proximity①">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a> <a href="#ref-for-valdef-scroll-snap-type-proximity②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="captures-snap-positions">
   <b><a href="#captures-snap-positions">#captures-snap-positions</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-captures-snap-positions">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="scroll-snap-container">
   <b><a href="#scroll-snap-container">#scroll-snap-container</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-scroll-snap-container">4.1. Scroll Snapping Rules: the scroll-snap-type property</a>
    <li><a href="#ref-for-scroll-snap-container①">4.1.2. 
Scroll Snap Strictness: the none, proximity, and mandatory values</a>
    <li><a href="#ref-for-scroll-snap-container②">4.1.3. 
Re-snapping After Layout Changes</a>
    <li><a href="#ref-for-scroll-snap-container③">4.2. Scroll Snapport: the scroll-padding property</a> <a href="#ref-for-scroll-snap-container④">(2)</a>
    <li><a href="#ref-for-scroll-snap-container⑤">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a>
    <li><a href="#ref-for-scroll-snap-container⑥">6.2. Choosing Snap Positions</a>
    <li><a href="#ref-for-scroll-snap-container⑦">9.1. Changes Since 31 January 2019 CR</a>
    <li><a href="#ref-for-scroll-snap-container⑧">9.3. Changes Since 24 August 2017 CR</a>
    <li><a href="#ref-for-scroll-snap-container⑨">9.4. Changes Since 20 October 2016 CR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-padding">
   <b><a href="#propdef-scroll-padding">#propdef-scroll-padding</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-padding">1. Introduction</a>
    <li><a href="#ref-for-propdef-scroll-padding①">3. Scroll Snap Model</a>
    <li><a href="#ref-for-propdef-scroll-padding②">4.2. Scroll Snapport: the scroll-padding property</a> <a href="#ref-for-propdef-scroll-padding③">(2)</a> <a href="#ref-for-propdef-scroll-padding④">(3)</a> <a href="#ref-for-propdef-scroll-padding⑤">(4)</a> <a href="#ref-for-propdef-scroll-padding⑥">(5)</a>
    <li><a href="#ref-for-propdef-scroll-padding⑦">Physical Longhands for scroll-padding</a> <a href="#ref-for-propdef-scroll-padding⑧">(2)</a>
    <li><a href="#ref-for-propdef-scroll-padding⑨">Flow-relative Longhands for scroll-padding</a> <a href="#ref-for-propdef-scroll-padding①⓪">(2)</a> <a href="#ref-for-propdef-scroll-padding①①">(3)</a>
    <li><a href="#ref-for-propdef-scroll-padding①②">9.1. Changes Since 31 January 2019 CR</a> <a href="#ref-for-propdef-scroll-padding①③">(2)</a> <a href="#ref-for-propdef-scroll-padding①④">(3)</a> <a href="#ref-for-propdef-scroll-padding①⑤">(4)</a> <a href="#ref-for-propdef-scroll-padding①⑥">(5)</a> <a href="#ref-for-propdef-scroll-padding①⑦">(6)</a>
    <li><a href="#ref-for-propdef-scroll-padding①⑧">9.4. Changes Since 20 October 2016 CR</a> <a href="#ref-for-propdef-scroll-padding①⑨">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="optimal-viewing-region">
   <b><a href="#optimal-viewing-region">#optimal-viewing-region</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-optimal-viewing-region">1. Introduction</a>
    <li><a href="#ref-for-optimal-viewing-region①">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-optimal-viewing-region②">9.1. Changes Since 31 January 2019 CR</a> <a href="#ref-for-optimal-viewing-region③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-scroll-padding-auto">
   <b><a href="#valdef-scroll-padding-auto">#valdef-scroll-padding-auto</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-scroll-padding-auto">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-valdef-scroll-padding-auto①">Physical Longhands for scroll-padding</a>
    <li><a href="#ref-for-valdef-scroll-padding-auto②">Flow-relative Longhands for scroll-padding</a>
    <li><a href="#ref-for-valdef-scroll-padding-auto③">9.1. Changes Since 31 January 2019 CR</a>
    <li><a href="#ref-for-valdef-scroll-padding-auto④">9.2. Changes Since 14 December 2017 CR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="scroll-snapport">
   <b><a href="#scroll-snapport">#scroll-snapport</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-scroll-snapport">3. Scroll Snap Model</a>
    <li><a href="#ref-for-scroll-snapport①">4.1.3. 
Re-snapping After Layout Changes</a>
    <li><a href="#ref-for-scroll-snapport②">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a> <a href="#ref-for-scroll-snapport③">(2)</a> <a href="#ref-for-scroll-snapport④">(3)</a> <a href="#ref-for-scroll-snapport⑤">(4)</a>
    <li><a href="#ref-for-scroll-snapport⑥">5.2.1. 
Scoping Valid Snap Positions to Visible Boxes</a> <a href="#ref-for-scroll-snapport⑦">(2)</a> <a href="#ref-for-scroll-snapport⑧">(3)</a> <a href="#ref-for-scroll-snapport⑨">(4)</a>
    <li><a href="#ref-for-scroll-snapport①⓪">5.2.2. 
Snapping Boxes that Overflow the Scrollport</a> <a href="#ref-for-scroll-snapport①①">(2)</a> <a href="#ref-for-scroll-snapport①②">(3)</a> <a href="#ref-for-scroll-snapport①③">(4)</a>
    <li><a href="#ref-for-scroll-snapport①④">6.2. Choosing Snap Positions</a> <a href="#ref-for-scroll-snapport①⑤">(2)</a>
    <li><a href="#ref-for-scroll-snapport①⑥">Physical Longhands for scroll-padding</a>
    <li><a href="#ref-for-scroll-snapport①⑦">Flow-relative Longhands for scroll-padding</a> <a href="#ref-for-scroll-snapport①⑧">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-margin">
   <b><a href="#propdef-scroll-margin">#propdef-scroll-margin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-margin">1. Introduction</a>
    <li><a href="#ref-for-propdef-scroll-margin①">3. Scroll Snap Model</a>
    <li><a href="#ref-for-propdef-scroll-margin②">5.1. Scroll Snapping Area: the scroll-margin property</a>
    <li><a href="#ref-for-propdef-scroll-margin③">Physical Longhands for scroll-margin</a> <a href="#ref-for-propdef-scroll-margin④">(2)</a>
    <li><a href="#ref-for-propdef-scroll-margin⑤">Flow-relative Longhands for scroll-margin</a> <a href="#ref-for-propdef-scroll-margin⑥">(2)</a> <a href="#ref-for-propdef-scroll-margin⑦">(3)</a>
    <li><a href="#ref-for-propdef-scroll-margin⑧">9.1. Changes Since 31 January 2019 CR</a> <a href="#ref-for-propdef-scroll-margin⑨">(2)</a> <a href="#ref-for-propdef-scroll-margin①⓪">(3)</a>
    <li><a href="#ref-for-propdef-scroll-margin①①">9.3. Changes Since 24 August 2017 CR</a> <a href="#ref-for-propdef-scroll-margin①②">(2)</a>
    <li><a href="#ref-for-propdef-scroll-margin①③">9.4. Changes Since 20 October 2016 CR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="scroll-snap-area">
   <b><a href="#scroll-snap-area">#scroll-snap-area</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-scroll-snap-area">3. Scroll Snap Model</a>
    <li><a href="#ref-for-scroll-snap-area①">4.1.3. 
Re-snapping After Layout Changes</a>
    <li><a href="#ref-for-scroll-snap-area②">4.2. Scroll Snapport: the scroll-padding property</a>
    <li><a href="#ref-for-scroll-snap-area③">5.1. Scroll Snapping Area: the scroll-margin property</a> <a href="#ref-for-scroll-snap-area④">(2)</a> <a href="#ref-for-scroll-snap-area⑤">(3)</a>
    <li><a href="#ref-for-scroll-snap-area⑥">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a> <a href="#ref-for-scroll-snap-area⑦">(2)</a> <a href="#ref-for-scroll-snap-area⑧">(3)</a> <a href="#ref-for-scroll-snap-area⑨">(4)</a>
    <li><a href="#ref-for-scroll-snap-area①⓪">5.2.1. 
Scoping Valid Snap Positions to Visible Boxes</a> <a href="#ref-for-scroll-snap-area①①">(2)</a> <a href="#ref-for-scroll-snap-area①②">(3)</a> <a href="#ref-for-scroll-snap-area①③">(4)</a> <a href="#ref-for-scroll-snap-area①④">(5)</a> <a href="#ref-for-scroll-snap-area①⑤">(6)</a> <a href="#ref-for-scroll-snap-area①⑥">(7)</a>
    <li><a href="#ref-for-scroll-snap-area①⑦">5.2.2. 
Snapping Boxes that Overflow the Scrollport</a> <a href="#ref-for-scroll-snap-area①⑧">(2)</a> <a href="#ref-for-scroll-snap-area①⑨">(3)</a>
    <li><a href="#ref-for-scroll-snap-area②⓪">5.2.3. 
Unreachable Snap Positions</a>
    <li><a href="#ref-for-scroll-snap-area②①">6.2. Choosing Snap Positions</a>
    <li><a href="#ref-for-scroll-snap-area②②">Physical Longhands for scroll-margin</a>
    <li><a href="#ref-for-scroll-snap-area②③">Flow-relative Longhands for scroll-margin</a> <a href="#ref-for-scroll-snap-area②④">(2)</a>
    <li><a href="#ref-for-scroll-snap-area②⑤">9.1. Changes Since 31 January 2019 CR</a>
    <li><a href="#ref-for-scroll-snap-area②⑥">9.3. Changes Since 24 August 2017 CR</a>
    <li><a href="#ref-for-scroll-snap-area②⑦">9.4. Changes Since 20 October 2016 CR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-snap-align">
   <b><a href="#propdef-scroll-snap-align">#propdef-scroll-snap-align</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-snap-align">3. Scroll Snap Model</a>
    <li><a href="#ref-for-propdef-scroll-snap-align①">5.2. Scroll Snapping Alignment: the scroll-snap-align property</a> <a href="#ref-for-propdef-scroll-snap-align②">(2)</a>
    <li><a href="#ref-for-propdef-scroll-snap-align③">9.2. Changes Since 14 December 2017 CR</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-snap-stop">
   <b><a href="#propdef-scroll-snap-stop">#propdef-scroll-snap-stop</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-snap-stop①">5.3. Scroll Snap Limits: the scroll-snap-stop property</a> <a href="#ref-for-propdef-scroll-snap-stop②">(2)</a>
    <li><a href="#ref-for-propdef-scroll-snap-stop③">9.4. Changes Since 20 October 2016 CR</a> <a href="#ref-for-propdef-scroll-snap-stop④">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="intended-end-position">
   <b><a href="#intended-end-position">#intended-end-position</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-intended-end-position">5.3. Scroll Snap Limits: the scroll-snap-stop property</a>
    <li><a href="#ref-for-intended-end-position①">6.1. Types of Scrolling Methods</a>
    <li><a href="#ref-for-intended-end-position②">6.2. Choosing Snap Positions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="intended-direction-and-end-position">
   <b><a href="#intended-direction-and-end-position">#intended-direction-and-end-position</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-intended-direction-and-end-position">6.1. Types of Scrolling Methods</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="natural-end-point">
   <b><a href="#natural-end-point">#natural-end-point</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-natural-end-point">6.2. Choosing Snap Positions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="intended-direction">
   <b><a href="#intended-direction">#intended-direction</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-intended-direction">6.1. Types of Scrolling Methods</a>
    <li><a href="#ref-for-intended-direction①">6.2. Choosing Snap Positions</a> <a href="#ref-for-intended-direction②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="axis-lock">
   <b><a href="#axis-lock">#axis-lock</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-axis-lock">6.1. Types of Scrolling Methods</a>
    <li><a href="#ref-for-axis-lock①">6.2. Choosing Snap Positions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-padding-inline-start">
   <b><a href="#propdef-scroll-padding-inline-start">#propdef-scroll-padding-inline-start</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-padding-inline-start">Flow-relative Longhands for scroll-padding</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-padding-block-start">
   <b><a href="#propdef-scroll-padding-block-start">#propdef-scroll-padding-block-start</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-padding-block-start">Flow-relative Longhands for scroll-padding</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-padding-inline-end">
   <b><a href="#propdef-scroll-padding-inline-end">#propdef-scroll-padding-inline-end</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-padding-inline-end">Flow-relative Longhands for scroll-padding</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-padding-block-end">
   <b><a href="#propdef-scroll-padding-block-end">#propdef-scroll-padding-block-end</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-padding-block-end">Flow-relative Longhands for scroll-padding</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-margin-block-start">
   <b><a href="#propdef-scroll-margin-block-start">#propdef-scroll-margin-block-start</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-margin-block-start">Flow-relative Longhands for scroll-margin</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-margin-inline-start">
   <b><a href="#propdef-scroll-margin-inline-start">#propdef-scroll-margin-inline-start</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-margin-inline-start">Flow-relative Longhands for scroll-margin</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-margin-block-end">
   <b><a href="#propdef-scroll-margin-block-end">#propdef-scroll-margin-block-end</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-margin-block-end">Flow-relative Longhands for scroll-margin</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-scroll-margin-inline-end">
   <b><a href="#propdef-scroll-margin-inline-end">#propdef-scroll-margin-inline-end</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-scroll-margin-inline-end">Flow-relative Longhands for scroll-margin</a>
   </ul>
  </aside>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>